The Xataface Output Cache[Permalink]Note: There was a bug in the output cache affecting Xataface version 1.0 to 1.3rc1. If you are using a version of Xataface older than 1.3rc2 then you should either disable the output cache, or replace the Dataface/OutputCache.php file with one from a newer version.
Xataface does quite a bit of heavy lifting on each page request. If your application is getting a lot of traffic that is slowing your server down, you may want to look at enabling the Xataface output cache. Features
How it works?When you receive a request, Xataface will return a cached version of the page if the page has been accessed before. If the page doesn't yet exist in the cache it generates the page, saves it to the cache and outputs it to the user transparently. The cache is completely transparent to your users. Where is the cache stored?Xataface creates a table called __output_cache that stores all of the cached content for your application. This table stores both a GZIPed and regular version of each page. If the user's browser supports GZIP compression, Xataface will automatically return the GZIP version. This results in further performance improvements. What if I make changes to the database?Xataface records which tables were in use when a page is cached. If any of those tables are modified after the page is cached, Xataface will mark that cached page as out of date and regenerate it the next time that it is requested. What if I make changes to my configuration files and templates?The output cache will have to be manually cleared if you make any changes to your source files (e.g. PHP, templates, and INI files). Clearing the cache is as easy as deleting or emptying the __output_cache table. How do I enable the Cache?Add the following to your conf.ini file:
How do I disable the Cache?Simply comment out or remove the [_output_cache] section of your conf.ini file. E.g.
Configuration OptionsThe following directives can be added to the [_output_cache] section of your conf.ini file to customize how your output cache works.
|