How to disable session cache ?

Discussion regarding Joomla! 2.5 Performance issues.

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.
Locked
User avatar
magistr_yoda
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Sun Jun 10, 2007 6:42 am
Location: Tashkent
Contact:

How to disable session cache ?

Post by magistr_yoda » Wed Nov 26, 2014 12:47 pm

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 ?

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: How to disable session cache ?

Post by sitesrus » Wed Nov 26, 2014 2:13 pm

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.
I like working with Joomla :)

User avatar
magistr_yoda
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Sun Jun 10, 2007 6:42 am
Location: Tashkent
Contact:

Re: How to disable session cache ?

Post by magistr_yoda » Thu Nov 27, 2014 7:41 am

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.
Possible that you say its true, then need to cache only sql queries.

Before that, site works with cache on apache server - and work without errors.
Now it works on nginx server - and cache not work correctly

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: How to disable session cache ?

Post by sitesrus » Thu Nov 27, 2014 2:14 pm

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.
I like working with Joomla :)

User avatar
magistr_yoda
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Sun Jun 10, 2007 6:42 am
Location: Tashkent
Contact:

Re: How to disable session cache ?

Post by magistr_yoda » Thu Nov 27, 2014 2:59 pm

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 ?

User avatar
magistr_yoda
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Sun Jun 10, 2007 6:42 am
Location: Tashkent
Contact:

Re: How to disable session cache ?

Post by magistr_yoda » Thu Nov 27, 2014 6:51 pm

Install plg_cachecontrol - and disable caching for adsmanager - works fine.


Locked

Return to “Performance - Joomla! 2.5”