En:How does caching work?
From phpCMS
Question: How does caching work?
Answer:
If there is a request for the file www.example.com/index.html, phpCMS creates a unique name for the requested file from the domain name (e.g. www.example.com), the path to the file (e.g. /home/someuser/htdocs/) and the filename (e.g. index.html). Using this three parts, a MD5-encoded string (a 32 characters long string composed out of hexadezimal digits) is calculated, (e.g. "41d9943c8c255533e30e61a752cbc7ea" ) and will be used as the filename of the cached file within the phpCMS cache directory. Using the hash functionality, multiple domains can use the same cache directory without cause filename clashes (as www.example1.com/index.html and www.example2.com/index.html will have different hash values).
phpCMS now checks if there is a file named "41d9943c8c255533e30e61a752cbc7ea" in the cache directory that has a suffix '.gz', '.dyn' or '.htm(l)'.
- .dyn
- Dynamically cached pages that e.g. have an included script. phpCMS now doesn't need to create the whole page anew but can just run the script and put it's output into the pre-parsed page.
- .htm(l)
- Completely static pages - pages without scripts and none or just static plugins. Those pages are cached as complete HTML output and can simply be delivered to the user.
- .gz
- gzip-compressed static pages. This is used for static pages (see above), but only if the gzip-compression is available in PHP and activated in the phpCMS configuration.
If the page was cached as '.dyn', the script included is run and it's output merged with the page, and the result is sent to the user (possibly gzip-compressed before being sent if required), while '.gz'- and '.htm(l)'-cached pages are directly sent.
Diese Seite in anderen Sprachen: Deutsch
Main Page: FAQ MainPage | Top Page: English FAQ MainPage

