Package DE_EPAGES::DataCache::API::SharedCache
This package provides an interface to cache data. To save a entry at cache use GetCache. The returned hash is a tied hash, which checks if the maximum count of elements is reached. Otherwise the tied-hash works like normal standard perl hash. To update the cache on other application servers use UpdateCache.
@EXPORT_OK |
Functions
GetCache
Gets a named cache. Creates a cache if not exists.
Syntax |
$NamedCache = GetCache($ConnectionKey, $CacheName); |
Example |
use DE_EPAGES::Database::API::Connection qw ( GetCurrentDBHandle ); my $dbi = GetCurrentDBHandle(); $NamedCache = GetCache($dbi->cacheKey, 'InfoYourObject'); |
Input |
|
Return |
|
UpdateCache
Deletes the cache entry, and adds an item to touched cache (to inform the message center about the changes). If no parameter is submitted then the complete cache will be cleared.
Syntax |
UpdateCache($ConnectionKey, $CacheName, $Parameter); |
Input |
|
UpdateLocal
Deletes all local caches, dont inform other appserver (in case of transaction rollback).
Syntax |
UpdateLocal(); |