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

[eluser]BrianDHall[/eluser]
[quote author="Xeoncross" date="1253740952"][quote author="BrianDHall" date="1253735683"]
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]

Touche, a very good point. If you changed navigation you would need to regenerate an entire site, which could potentially be thousands of pages. That'd kind of suck.

Quote:
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.

Wow, an optimizer who actually knows what they are doing! Bravo!

In this case, it seems to me that you have a very good tool for specific scenarios where performance will matter to the tune of considerable amounts of money and usability. Like any tool its not a panacea or a works-anywhere-anytime approach, but for when it is needed it seems like a darn good solution.


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



Theme © iAndrew 2016 - Forum software by © MyBB