Cache problems (cookie ignored, comments not showing)

Report bugs and errors in this forum.

Cache problems (cookie ignored, comments not showing)

Postby Thrik » Sun Jan 08, 2006 11:29 pm

I'm not sure how exactly the global cache works, but if possible I'd like to use it as it seems to speed up my site's load time quite significantly (as I have three news includes reading from a large database on every page). It works great for the most part, but two small problems are causing issues and need fixing ASAP -- a "hotfix" would be highly appreciated.



The first is that when a news post is cached, it seems to also cache the remembered username/email for the commenter. For example, if I post an item of news, it'll show my username and email address in everybody's comment form. Needless to say, this is a fairly significant problem.



The second is a bit more minor, but still would be nice. When a comment is added, it doesn't seem to clear the whole cache for that particular news post. I would really like it to clear the corresponding news items' short story cache file when a comment is added, but it doesn't.



Hope somebody can help, and this script is fast approaching being totally perfect for my needs! :)
Thrik
 
Posts: 50
Joined: Wed Oct 26, 2005 3:19 am

Postby FI-DD » Mon Jan 09, 2006 12:30 am

I'm afraid I can't help you with this. :(



Maybe BadDog can - in contrast to me he seems to understand quite a lot of this cookie/cache stuff.



Otherwise you have to wait and hope that Lexa comes by and reads this and hopefully solves it.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Thrik » Mon Jan 09, 2006 11:32 pm

Hehe, okay.. you have helped me with far too much anyway :shock:



I've just noticed that with global cache enabled it does seem to refresh the whole cache when someone adds a comment, so you can ignore my second question for now ... I would still like to solve the first problem though. I have temporarily just removed the info remember stuff altogether, but it'd be nice to put it back in again at some point. :)
Thrik
 
Posts: 50
Joined: Wed Oct 26, 2005 3:19 am

Postby BadDog » Tue Jan 10, 2006 1:35 pm

Edit addnews.mdu in /inc/mod folder...find line "if ($action == 'doaddnews'){" and add this above it:



foreach (glob($cutepath."/cache/*.tmp") as $filename) {

@unlink($filename);

}



This will clean out the cache and assure new data is cached and served.



global_cache caches the entire main index, whereas when cache alone simply caches titles and individule comments only, causing the main index to be generated from database every time it is requested.
BadDog
 
Posts: 62
Joined: Mon Nov 21, 2005 8:19 am


Return to Bugs and errors



Who is online

Users browsing this forum: No registered users and 0 guests

cron