Skip to the content
Documentation

[CacheSettings]

No ratings yet
Setting Summary
AlwaysUpdateArray Sets the static caches that should always be updated when an object is published.
CachedURLArray Sets the content that should be statically cached.
HostName Sets the hostname of the machine generating the static content.
MaxCacheDepth Sets the number of levels that will be statically cached relative to the root of your installation.
StaticStorageDir Sets the directory where the static cache is stored.

Changed in Exponential 6.0.15

Settings of this group in the settings files of Exponential 6.0.15 that this page does not describe:

Setting File Default Description
ApplicationCache settings/rest.ini enabled Global switch to enable/disable REST application cache
ApplicationCacheDefault settings/rest.ini enabled Default value if no specific value has been defined for your controller/action If enabled, result of each service call will be cached You can refine this with setting specific to your controller/action The system will look for a [<controllerClass>_<action>_CacheSettings] block to check if cache can be used, and if so, which TTL to use If this block cannot be found, the system will search at the controller level, and so look for a [<controllerClass>_CacheSettings] block. See example block below for more information Basically this setting allow you to activate the cache to your controllers/actions individually
DefaultCacheTTL settings/rest.ini 600 Set default TTL to 10min, in seconds
RouteApcCache settings/rest.ini enabled Switch to enable/disable Routes cache with APC
RouteApcCacheTTL settings/rest.ini 3600 TTL for Route APC cache, in seconds
SourceProtocol settings/staticcache.ini http The protocol used to fetch pages, http or https. http is fine on a site that redirects to https, because the fetch follows redirects. Set https where plain http is refused outright rather than redirected.
CachedSiteAccesses settings/staticcache.ini (empty) A list of site accesses to generate static content for. Left empty, the siteaccesses this installation serves are used: every entry of site.ini.[SiteAccessSettings].RelatedSiteAccessList except those that require a login, whose pages are per user and must not be shared. Name siteaccesses here to override that.
CronjobCacheClear settings/staticcache.ini disabled Defer cache generation to cronjob.
AppendGeneratedTime settings/staticcache.ini true Controls whenever <!-- Generated: YYY-MM-DD HH:MM:SS --> comment should be appended into the generated static cache file.
Enabled settings/velocity.ini enabled The server's response cache, in front of the workers. A hit is answered by the parent process -- no fork, no PHP, no database. Measured on this installation, anonymous front page: about 3,500 req/s from the cache against 27 rendered. The settings further down that used to live in [ServerSettings] as CacheSkipCookies, CacheStaleWhileRevalidate, CacheNotFoundSeconds, MinifyCachedHtml and MiddleOutCompression still work there; a value here wins. Needs qbix-webserver v0.0.4.26 or later: older versions matched the session cookie by its exact name, never recognised eZSESSID<digest>, and served a signed-in visitor's pages to everybody.
DefaultTtl settings/velocity.ini 30 Seconds an anonymous page is kept. Exponential sends Cache-Control: no-cache, must-revalidate, which the server does not treat as a refusal, so a page is stored only when it has a lifetime -- its own max-age, or this. 0 caches only responses that bring their own. The trade: a visitor may see a page up to this old, and a page that differs between anonymous visitors without a cookie telling them apart would be shared between them. Signed-in visitors are never served from the cache.
Dir settings/velocity.ini var/cache/qbix-reverse Where entries too large for shared memory are kept. Relative paths resolve against the installation root. Left to itself the server would put them in files/cache/reverse of the directory above the document root.
APCu settings/velocity.ini enabled Small responses in APCu, shared by every worker; larger ones on disk. APCuMaxSize is the size limit in bytes, 0 leaves the server's 65536.
APCuMaxSize settings/velocity.ini 0  
SweepEvery settings/velocity.ini 300 Clearing expired entries off the disk, every SweepEvery seconds (0 switches it off). SweepMaxAge removes anything older than that regardless of its own lifetime -- without it, a response that says max-age=31536000 stays a year.
SweepMaxAge settings/velocity.ini 86400  
FileMode settings/velocity.ini 0640 Permissions, octal, as in [LogSettings]. A cached page is what an anonymous visitor sees, but nothing else on the machine needs to read it.
DirMode settings/velocity.ini 0750  
SkipCookies settings/velocity.ini (empty) Which cookies mean "this response is personal, do not cache it", matched as a prefix. Empty means the session cookie plus is_logged_in, which the kernel sets for signed-in visitors for exactly this purpose. The session cookie's name follows [Session] SessionNameHandler in site.ini: with "default" PHP names it (PHPSESSID); with "custom" it is SessionNamePrefix, which as a prefix also covers every siteaccess's <prefix><digest>. To name them yourself, list every one -- a list replaces the default: SkipCookies[] SkipCookies[]=PHPSESSID SkipCookies[]=is_logged_in
StaleWhileRevalidate settings/velocity.ini 60 Seconds an expired page may still be served while one request renders the replacement, so that an expiry does not send every visitor to PHP at once.
NotFoundSeconds settings/velocity.ini 0 Seconds a 404 is remembered, so a crawler walking dead links does not run the full rendering path for each. 0 (the default) remembers none: every 404 reaches PHP, as under Apache, so 404.log and the request classifier (security.log) see each one -- a 404 answered from the cache was seen once a minute at most. A 404 the kernel marks private, no-store is never kept anyway.
HonorRequestNoCache settings/velocity.ini enabled A request carrying Cache-Control: no-cache (or Pragma: no-cache) is sent to PHP instead of being answered from the cache, and the answer is stored again. A browser's ordinary reload (max-age=0) is still answered from the cache. Needs exponential-velocity with Q.web.cache.honorRequestNoCache; older versions ignore it.
MinifyHtml settings/velocity.ini enabled Collapse the templates' indentation in stored pages: 27 % smaller documents.
MiddleOutCompression settings/velocity.ini disabled Compress stored entries against a shared dictionary. Measured and left off: entries are stored already gzipped, and a dictionary cannot shrink that.

In this section

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.