Welcome Guest, Not a member yet? Register   Sign In
Checking for non-logged in users before showing cached pages [Adv.]
#6

[eluser]Xeoncross[/eluser]
[quote author="Damien K." date="1253604321"]I'm inclined to say that this use case is not a good cadidate for caching, because (1) comments are dynamic (new ones can be added) and caching will not show new comments.
[/quote]

That is solved by removing the cache when new comments are added by logged in users. So it's not a problem.


Quote:I see why you're doing this though. I assume you have a few million hits a day viewing your blog archives and cannot scale.

Actually, I am a die hard performance guy that can't stand page loads over 40ms.


Quote:First, how are you caching your pages? CI's built-in feature or your own? I see you mention CI and I also see "show_cache()" and "create_cache()", which I don't think are CI functions. If you're using CI, where are you testing for the logged_in cookie?

Actually, the use of CI is a example. Any framework will work. And yes, the show/create_cache() functions are fictitious.

Quote:However, the short (and I believe is the ideal) answer is: don't cache.

What if I were to tell you that not caching would result in a 10 fold increase in the required resources? Memcache and partial page caching is what takes a site from 100 pages a second to +1,000.

Plus I really don't like managing 5 servers when one will work. ;-)


Messages In This Thread
Checking for non-logged in users before showing cached pages [Adv.] - by El Forum - 09-21-2009, 08:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB