Package DE_EPAGES::Object::API::SavedIncludesHandler
Handles SavedIncludes.
Functions
cleanup
Removes obsolete saved includes files and directories from the root directory.
Syntax |
$SavedIncludesHandler->cleanup() $SavedIncludesHandler->cleanup($Verbose) |
Input |
|
clearAllCaches
Increases the counter for the saved includes version of the system object. This invlidates the global saved includes directory of the store. Files with an outdated version number will be deleted using the function 'cleanup'.
Syntax |
$SavedIncludesHandler->clearAllCaches; |
clearObjectCache
Increases the counter for the saved includes version. Only cache files with the current version number are read. The old files will be deleted when the new cache files are written, see function 'savePage'.
Syntax |
$SavedIncludesHandler->clearObjectCachePath($Object); |
Input |
|
getObjectCachePath
Returns the path of cache directory for an specific object. The object doesnt have to cached already, so the directory doesent have to exist. The path contains the version number of the system object as well as the version number of the object itself.
Syntax |
$CachePath = $SavedIncludesHandler->getObjectCachePath($Object); |
Input |
|
Return |
|
getRootCachePath
Returns the path of directory where all "saved-includes" stored. (e.g. "C:/epages/Shared/Static/Store/SavedIncludes")
Syntax |
$CachePath = $SavedIncludesHandler->getRootCachePath; |
Return |
|
new
Creates a new SavedIncludesHandler object
Syntax |
$SavedIncludesHandler = DE_EPAGES::Object::API::SavedIncludesHandler->new(); |
savePage
Save cache of actual object in File. Use static path of actual object including version numbers of the saved includes. To save cache file the function will need a unique cachekey, this key is integrated in filename. Also a function to compute the content is needed. Content is computed if no cachefile exist. In this case, direcories containing saved includes of this object with an outdated version number will deleted if there exist any of them.
Syntax |
$Content = $SavedIncludesHandler->savePage($CacheKey, $FallBackSub); |
Example |
$Content = $SavedIncludesHandler->savePage('MBO.Menu_de', sub{ return join '', @{$Processor->replaceTLEs($cTemplate)}; }); |
Input |
|
Return |
|