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

[eluser]Xeoncross[/eluser]
[quote author="BrianDHall" date="1253735683"]I suppose kurucu actually kind of brings up the point of the problem with 'premature optimization' - seeking to optimize something you don't know will actually be a problem.[/quote]

My sites have received millions of page views since their launch. I have sites running wordpress, drupal, and frameworks. So in my case optimization is a valid issue - one which I intend to fully use to my advantage.

Quote:For my money, if you want to really capitalize on caching enough to make it worthwhile you have a CI system that generates static real .html pages, you have an htaccess system that permits accessing a file directly if it exists (so the .html file doesn't get redirect if it really exists).

MoveableType took this approach and we see that it is causing performance problems for them. Imagine changing one sidebar link used on a site with 300 articles - you have to regenerate all those pages.

Quote:Hm, here's a thought thats more in line with the OP - what if you edited the index.php file to check for a cookie and then either served a cached page or static html page, or then proceeded with loading CI? Then the overhead is just a very small 1 page php script to check for the cookie.

Bingo. I have actually already done this. So far it is working great, providing what I deem a third and final layer of caching for my system.

For those browsing this thread, again I want to remind you that this method we have been discussing is only one of at least three layers of caching that your system could employ. Given highly volatile pages it won't even work - but as long as your page generally remains the same for at least a minute it will diffidently prove useful.

However, more important than this method is the use of DB query caching and partial view caching (i.e. sidebar widgets). Memcached is your friend.


Messages In This Thread
Checking for non-logged in users before showing cached pages [Adv.] - by El Forum - 09-23-2009, 10:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB