The problem with depending on any external caching (Apache, php, whatever) is that it doesn’t allow for having uncached dynamic content. For example, a page that contains a self-referencing form cannot be cached at all in that case, or the POST values from the form never get processed. With MODx caching, you can cache most of the page (menus, etc) and only the dynamic part generated by the snippet is processed.
MODx caches to PHP files in order to support non-cacheable tags. Caching in MODx is split into two major parts, the siteCache and the partial page caches. The siteCache keeps a registry of all the documents and all the source for your elements (i.e. chunks, snippets, plugins) while each partial page cache puts all of your cacheable content into a php document that is simply included on cached requests (instead of database queries). Someone wrote a static html file caching solution using a plugin some time ago called htcache that provided a way to cache static html files from MODx and serve them using mod_rewrite. You might look into this solution as it was a good approach.
Concerning MODx caching, the cached file is still written as a .php file, not a static .html file. What exactly is the reason for this? This way for cached files you still need to hit the PHP engine, and also the MODx parser it seems.
I would think that the solution in the first link above would be a very nice one, because it’s done through the .htaccess file, but this would probably need static .html files instead of .php files?
Quote from: olafmol at Aug 21, 2008, 05:47 AMMODx caches to PHP files in order to support non-cacheable tags. Caching in MODx is split into two major parts, the siteCache and the partial page caches. The siteCache keeps a registry of all the documents and all the source for your elements (i.e. chunks, snippets, plugins) while each partial page cache puts all of your cacheable content into a php document that is simply included on cached requests (instead of database queries). Someone wrote a static html file caching solution using a plugin some time ago called htcache that provided a way to cache static html files from MODx and serve them using mod_rewrite. You might look into this solution as it was a good approach.
Concerning MODx caching, the cached file is still written as a .php file, not a static .html file. What exactly is the reason for this? This way for cached files you still need to hit the PHP engine, and also the MODx parser it seems.
I would think that the solution in the first link above would be a very nice one, because it’s done through the .htaccess file, but this would probably need static .html files instead of .php files?