Portal Home > Knowledgebase > Articles Database > Problems with caching


Problems with caching




Posted by postman101, 02-08-2008, 05:11 PM
Dear fellas, Please help me solve the big and urgent problem I have. My site runs relatively slow and I want to add chat to it I do have this (as recommended by a friend) in my .htaccess because I want to be able to log all of the clicks on my site: #NEVER CACHE Header set Expires "Thu, 01 Dec 2003 16:00:00 GMT" Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate" Header set Pragma "no-cache" My site is relatively slow...and I would like to speed it up witouth loosing the benefit of being able to log all the clicks on the site. How should I go about this problem...what i realized is that user avatars are not cached and because my site is a social networking site on some pages it has lots of avatar images. Should I enable user avatar caching and/or do some other stuff? and if yes how should I enable user avatars but still be able to log all the users clicks? I am running the site on a VPS server with 768MB RAM. Thank you VERY much.

Posted by NWSTech, 02-08-2008, 05:15 PM
why would caching cause issues, most users browsers wont cache an entire page so they will still request a page anyway

Posted by postman101, 02-08-2008, 05:26 PM
I see. 98% of the pages of my site are .php If I delete: #NEVER CACHE Header set Expires "Thu, 01 Dec 2003 16:00:00 GMT" Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate" Header set Pragma "no-cache" ...would I still be able to log all (or at least 98% of all) URI requests? Would removing those lines speed up my site significantly or is there something else in addition that I need to do? I am not sure why users avatars are not cached...and what would I need to do to enable that...

Posted by Steve_Arm, 02-08-2008, 05:47 PM
About the avatars, if you output them with php i.e.: they will never cache. Can you post the url to the site?

Posted by postman101, 02-08-2008, 05:57 PM
Steve, site is password-protected..but if you think it can help I can provide you with an account. Links to images are: icon.php?id=19. So I guess there is no way to cache them? Is there anything else I could do to speed up my site but to preserve logging of all URI's?

Posted by Steve_Arm, 02-08-2008, 06:18 PM
Yeah, that way they won't cache. Been there done that. Had to revert to plain image calls. PM the url to take a look and an account. How many queries run per page on average?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Load high.. (Views: 520)