Documentation

InitCache

bool
CPageCache::InitCache(
 int TTL,
 string uniq_str,
 mixed initdir = false,
 string basedir = "cache"
)

The method initializes set of object properties that belong to CPageCache class. If cache file is unavailable or has expired, the method returns "false", or returns "true" otherwise. Non-static method.

Parameters

ParameterDescription Available from version
TTL Cache lifetime in seconds.
uniq_str Face unique ID. This identifier must include all parameters that can affect the result of executed cached code.
initdir Folder that stores component cache, related to /bitrix/cache/. If - "/", the cache is valid for all site catalogs.
Optional. Default value - current catalog.
3.2.9
basedir Basic cache directory. Default value is cache, meaning all is saved in /BX_PERSONAL_ROOT/cache/, wh ere BX_PERSONAL_ROOT equals 'bitrix' by default.5.1.2

See Also



© «Bitrix24», 2001-2022
Up