I'm using something called Quickcache for PHP that provides full-page caching of webpages. It works great, but my only issue is that I have a dynamic website, and certain things do not update the way I want them to when caching is turned on.
For example, if a user logs in, the login box will still appear, even though to the server the user is logged in (I can go to an uncached part of the site and it'll show the user logged in perfectly fine). Same goes for changing user settings, etc.
I also can't dump the cache every time a user logs in or changes a tiny setting, that'd be overkill.
It seems like I can't cache because it makes the site unusable, and I don't cache the site will be unusable under any appreciable load.
How should I solve this problem? I'm pretty new to caching in general - I'm rolling out one of my sites for production for the first time. Surely others have had and solved this problem.
I'm not a php person but I can tell you about caching.
Dynamic sites that generate content per user are the trickiest to do effectively, however, it can be done. It will require that you look at how data flows in your application in order to determine how, where and what to cache. Here are some guidelines :
Not just data from the database is a candidate for caching. If you have a block of complex logic that manipulates data, consider caching the output of that logic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With