BlockCache BlockCache(
$type,
$keys
)
|
|
Constructor
Parameters:
We are going to output personal data and we want to abort collecting the data for the cache.
void cacheproviderretrieve(
mixed
$key,
&$success, mixed
$success
)
|
|
put your comment there...
Parameters:
|
mixed |
$key: |
|
|
mixed |
$success: |
|
|
|
&$success: |
|
Information Tags:
| Todo: | dh> This method should get removed from here, it's not limited to BlockCache. |
void cacheproviderstore(
mixed
$key, mixed
$payload
)
|
|
put your comment there...
Parameters:
|
mixed |
$key: |
|
|
mixed |
$payload: |
|
Information Tags:
| Todo: | dh> This method should get removed from here, it's not limited to BlockCache. |
Check if cache contents are available, otherwise start collecting output to be cached
Basically we get all the invalidation dates we need, then we get the data and then we check if some invalidation occured after the data was cached. If an invalidation date is missing we consider the cache to be obsolete but we generate a new invalidation date for next time we try to retrieve.
API Tags:
| Return: | if we found and have echoed content from the cache |
End collecting output to be cached
We just concatenate all the individual keys to have a single one Then we store with the current timestamp
void invalidate_key(
$key,
$val
)
|
|
Invalidate a special key
All we do is store the timestamp of teh invalidation
Parameters:
void output_handler(
$buffer
)
|
|
This is called every x bytes to provide real time output
Parameters:
boolean retrieve(
[integer
$oldest_acceptable_ts = NULL], [
$most_recent_invaliating_key = '']
)
|
|
Retrieve and output cache
Parameters:
|
integer |
$oldest_acceptable_ts: |
oldest acceptable timestamp |
|
|
$most_recent_invaliating_key: |
|
API Tags:
| Return: | true if we could retrieve |