Modules/Default/ApplicationCache/Facade.php
\Conjoon_Modules_Default_ApplicationCache_Facade
This facade eases the access to often needed operations regarding backend implementations of the ApplicationCache.
- Author
- Thorsten Suckow-Homberg
Properties
Methods

_getRegistryFacade(
)
:
\Conjoon_Modules_Default_Registry_Facade| Type | Description |
|---|---|
| \Conjoon_Modules_Default_Registry_Facade |

getCacheEntryCountForUserId(
integer $userId, string $folder
)
:
integerReturns the number of cache entries that should get cached locally.
The number depends of the user settings, i.e. which kind of filetypes he wishes to cache.
| Name | Type | Description |
|---|---|---|
| $userId | integer | The id of the user for whom the number of cache entries should be returned. |
| $folder | string | The folder where the manifest files resist |
| Type | Description |
|---|---|
| integer |
| Exception | Description |
|---|---|
| \InvalidArgumentException, | RuntimeException |

getCacheLastChangedTimestampForUserId(
integer $userId
)
:
floatReturns the Unix timestamp in milliseconds of the cache last changes, i.e. the last time the user altered the options regarding file-types to cache.
| Name | Type | Description |
|---|---|---|
| $userId | integer | The id of the user for whom the lastChanged- timestamp should get returned. |
| Type | Description |
|---|---|
| float |
| Exception | Description |
|---|---|
| \InvalidArgumentException |

getInstance(
)
:
\Conjoon_Modules_Default_ApplicationCache_Facade| Type | Description |
|---|---|
| \Conjoon_Modules_Default_ApplicationCache_Facade |

getManifestFileListForUserId(
integer $userId, string $folder
)
:
arrayReturns the list of files that hold the cache entries: based on the user settings, only this files will be returned which represent a group of filetypes that should get cached.
| Name | Type | Description |
|---|---|---|
| $userId | integer | The user id for which the fileList should be returned |
| $folder | string | The folder where the manifest files resist |
| Type | Description |
|---|---|
| array | an associative array with the following keys: - combinedFile: a file name that should point to a file which holds all the requested cache files already combined - fileList: an array with file names where all the entries for the requested caches can be found |
| Exception | Description |
|---|---|
| \InvalidArgumentException |

setCacheLastChangedTimestampForUserId(
float $microtime, integer $userId
)
:
voidSets the last cached microtimestamp for the specified userId.
| Name | Type | Description |
|---|---|---|
| $microtime | float | The time in milliseconds |
| $userId | integer | The id of the user for whom the lastChanged- timestamp should be set. |
| Exception | Description |
|---|---|
| \InvalidArgumentException |