-
Bearded (M|G)od
Serverside caching with PHP
Anyone have any good resources on the best practices for doing this?
Say I have dynamic content. For example a blog. But I want to cache some of the less dynamic pages in a static html file in a cache folder, and have this on a time period. Say cache, file a for 24 hours.
I can devise some methods, but I want to know how some bigger online applications are handling it to learn it the proper way.
-
I think there is a nice example in the mod_rewrite docs
Musicman
-
Bearded (M|G)od
I was reading about it in my Advanced PHP Programming book using mod_rewrite, but is that the suggested way? I know applications like Wordpress don't do it that way. And I don't think that method would be too easy to stick into an MVC style, unless I am mistaken a bit?
-
Hi,
my understanding was that mod_rewrite would require less changes on an existing script that always regenerates pages ... and of course it would allow for big applications to split off a separate caching server
Musicman
-
Bearded (M|G)od
Thanks for the input.
I've been messing around with using mod_rewrite, and also integrating a Cache class into my application.
Would it benefit the server to do the straight mod_rewrite for a file? Or in the Cache class, serving up the static html document?
Also if I'm using mod_rewrite for caching, is there a way that I can have the Cached documents expire after aging? Sans running a cron-job.
On a side note, are there any ways that I can perform a test for how CPU intensive a script is? I want to work on optimizing my sites for large scale and I'd like to gauge how well it's doing on a small scale first and determine if it'll expand well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|