Hello - some component on site put vars in session.
Router get thouse vars and generate links for page.
But then joomla caching is turn on - links generating with errors - some vars, getting from another session.
But joomla cache need to be use becouse site has many sql querys to mysql.
1. Solution it - disable session caching
2. Solution cache only sql queryes
How to do this ?
How to disable session cache ?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- magistr_yoda
- Joomla! Intern
- Posts: 84
- Joined: Sun Jun 10, 2007 6:42 am
- Location: Tashkent
- Contact:
- sitesrus
- Joomla! Ace
- Posts: 1469
- Joined: Mon Nov 12, 2012 10:48 pm
Re: How to disable session cache ?
If you're using the system cache plugin in the plugin manager, disable it. Otherwise I'm not sure how joomla would use someone elses session? If you're using page caching it would generate a page, cache it, and re-serve it so it could be populated with variables generated from another user's visit yes.
It's not clear enough what you're saying.
It's not clear enough what you're saying.
I like working with Joomla . I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.
- magistr_yoda
- Joomla! Intern
- Posts: 84
- Joined: Sun Jun 10, 2007 6:42 am
- Location: Tashkent
- Contact:
Re: How to disable session cache ?
Possible that you say its true, then need to cache only sql queries.sitesrus wrote:If you're using the system cache plugin in the plugin manager, disable it. Otherwise I'm not sure how joomla would use someone elses session? If you're using page caching it would generate a page, cache it, and re-serve it so it could be populated with variables generated from another user's visit yes.
It's not clear enough what you're saying.
Before that, site works with cache on apache server - and work without errors.
Now it works on nginx server - and cache not work correctly
- sitesrus
- Joomla! Ace
- Posts: 1469
- Joined: Mon Nov 12, 2012 10:48 pm
Re: How to disable session cache ?
Query caching in mysql is different than joomla cache, it's seperate and in the mysql service. If you have shared hosting it likely isn't allowed but if you have VPS or dedicated than you can turn on mysql query caching + set a size or use innodb buffer pool or whatever that's called.
Nginx I'm not sure than, I know more about apache. If you're using web server caching or something like varnish than it's up to you to get it working properly with Joomla, no guarantees it'll work as intended and may need tweaking + exceptions of when not to cache.
The joomla system plugin is not meant for user login systems and etc. unless it's become better over the years, it could cache the wrong state/user and serve it to another person if browser caching isn't used as a setting and I'm not 100% sure if browser caching is okay either.
Don't use memory caching for sessions either, that could cause problems if not setup right. It's a setting in the joomla admin for sessions.
Nginx I'm not sure than, I know more about apache. If you're using web server caching or something like varnish than it's up to you to get it working properly with Joomla, no guarantees it'll work as intended and may need tweaking + exceptions of when not to cache.
The joomla system plugin is not meant for user login systems and etc. unless it's become better over the years, it could cache the wrong state/user and serve it to another person if browser caching isn't used as a setting and I'm not 100% sure if browser caching is okay either.
Don't use memory caching for sessions either, that could cause problems if not setup right. It's a setting in the joomla admin for sessions.
I like working with Joomla . I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.
- magistr_yoda
- Joomla! Intern
- Posts: 84
- Joined: Sun Jun 10, 2007 6:42 am
- Location: Tashkent
- Contact:
Re: How to disable session cache ?
News ) - Trouble not with sessions - troubles with caching in this component - modified adsmanager - which generates links - using session vars - like - 20-catname/545-citycode, 84-catname/4400-citycode - and homepage - with this links.
Then cache on - joomla gets homepage from /cache directory - and cache files may contains this links, generated before - from another user, from another city.
Now i see two solutions.
1. Disable cache for adsmanager component only - its optimized already manually - sql queryes set to minimum, and CPU operations to minimum.
2. Then system cache is works - need to store cache files with city(session) identifier, and then cache file uploads - need to separate it using session - and load only then city(session var) == cache + stored identifier.
How to do this - wich files in joomla need to modified ?
Then cache on - joomla gets homepage from /cache directory - and cache files may contains this links, generated before - from another user, from another city.
Now i see two solutions.
1. Disable cache for adsmanager component only - its optimized already manually - sql queryes set to minimum, and CPU operations to minimum.
2. Then system cache is works - need to store cache files with city(session) identifier, and then cache file uploads - need to separate it using session - and load only then city(session var) == cache + stored identifier.
How to do this - wich files in joomla need to modified ?
- magistr_yoda
- Joomla! Intern
- Posts: 84
- Joined: Sun Jun 10, 2007 6:42 am
- Location: Tashkent
- Contact:
Re: How to disable session cache ?
Install plg_cachecontrol - and disable caching for adsmanager - works fine.