Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

rest.ini [CacheSettings]

The settings of [CacheSettings] in rest.ini: ApplicationCache, ApplicationCacheDefault, DefaultCacheTTL, RouteApcCache, RouteApcCacheTTL

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/ini-settings/rest/CacheSettings.md

On this page

rest.ini [CacheSettings]

The block [CacheSettings] of settings/rest.ini, with 5 setting(s).

Never edit settings/rest.ini itself: an update replaces it. Put the settings you change in an override, which wins over the shipped file:

  • settings/override/rest.ini.append.php for every siteaccess,
  • settings/siteaccess/<siteaccess>/rest.ini.append.php for one siteaccess,
  • extension/<extension>/settings/rest.ini.append.php in an extension (read when the extension is active).

ApplicationCache

Global switch to enable/disable REST application cache

Default: enabled.

<?php /* #?ini charset="utf-8"?
# settings/override/rest.ini.append.php
[CacheSettings]
ApplicationCache=enabled
*/ ?>

ApplicationCacheDefault

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

Default: enabled.

<?php /* #?ini charset="utf-8"?
# settings/override/rest.ini.append.php
[CacheSettings]
ApplicationCacheDefault=enabled
*/ ?>

DefaultCacheTTL

Set default TTL to 10min, in seconds

Default: 600.

<?php /* #?ini charset="utf-8"?
# settings/override/rest.ini.append.php
[CacheSettings]
DefaultCacheTTL=600
*/ ?>

RouteApcCache

Example for action "viewContent", in "ezpRestContentController" controller class
[ezpRestContentController_viewContent_CacheSettings]
ApplicationCache=enabled
CacheTTL=3600
Below an example for every actions contained in "ezpRestContentController" controller class
[ezpRestContentController_CacheSettings]
ApplicationCache=enabled
CacheTTL=1200
Switch to enable/disable Routes cache with APC

Default: enabled.

<?php /* #?ini charset="utf-8"?
# settings/override/rest.ini.append.php
[CacheSettings]
RouteApcCache=enabled
*/ ?>

RouteApcCacheTTL

TTL for Route APC cache, in seconds

Default: 3600.

<?php /* #?ini charset="utf-8"?
# settings/override/rest.ini.append.php
[CacheSettings]
RouteApcCacheTTL=3600
*/ ?>

Generated by ./console exp:help:examples from settings/rest.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x