| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
stubClassLoader::load('net::stubbles::ipo::request::stubRequest', |
|---|
| 10 |
'net::stubbles::ipo::response::stubResponse' |
|---|
| 11 |
); |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
interface stubWebsiteCache extends stubObject |
|---|
| 19 |
{ |
|---|
| 20 |
|
|---|
| 21 |
* cache hit |
|---|
| 22 |
*/ |
|---|
| 23 |
const HIT = 'hit'; |
|---|
| 24 |
|
|---|
| 25 |
* cache miss |
|---|
| 26 |
*/ |
|---|
| 27 |
const MISS = 'miss'; |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
* sets whether used files should be checked if they are newer then the cached file |
|---|
| 31 |
* |
|---|
| 32 |
* @param bool $checkFiles |
|---|
| 33 |
*/ |
|---|
| 34 |
public function setCheckFiles($checkFiles); |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
* adds a variable to the list of cache variables |
|---|
| 38 |
* |
|---|
| 39 |
* @param string $name |
|---|
| 40 |
* @param scalar $value |
|---|
| 41 |
*/ |
|---|
| 42 |
public function addCacheVar($name, $value); |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
* adds a list of variables to the list of cache variables |
|---|
| 46 |
* |
|---|
| 47 |
* @param array<string,scalar> $cacheVars |
|---|
| 48 |
*/ |
|---|
| 49 |
public function addCacheVars(array $cacheVars); |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
* adds a file to the list of used files |
|---|
| 53 |
* |
|---|
| 54 |
* @param string $file |
|---|
| 55 |
*/ |
|---|
| 56 |
public function addUsedFile($file); |
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
* adds a list of files to the list of used files |
|---|
| 60 |
* |
|---|
| 61 |
* @param array<string> $files |
|---|
| 62 |
*/ |
|---|
| 63 |
public function addUsedFiles(array $files); |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
* returns the cache container used by the implementation |
|---|
| 67 |
* |
|---|
| 68 |
* @return stubCacheContainer |
|---|
| 69 |
*/ |
|---|
| 70 |
public function getCacheContainer(); |
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
* retrieves data from cache and puts it into response |
|---|
| 74 |
* |
|---|
| 75 |
* @param stubRequest $request |
|---|
| 76 |
* @param stubResponse $response |
|---|
| 77 |
* @param string $pageName name of the page to be cached |
|---|
| 78 |
* @return bool true if data was retrieved from cache, else false |
|---|
| 79 |
*/ |
|---|
| 80 |
public function retrieve(stubRequest $request, stubResponse $response, $pageName); |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
* stores the data from the response in cche |
|---|
| 84 |
* |
|---|
| 85 |
* @param stubRequest $request |
|---|
| 86 |
* @param stubResponse $response |
|---|
| 87 |
* @param string $pageName name of the page to be cached |
|---|
| 88 |
* @return bool true if successfully stored, else false |
|---|
| 89 |
*/ |
|---|
| 90 |
public function store(stubRequest $request, stubResponse $response, $pageName); |
|---|
| 91 |
} |
|---|
| 92 |
?> |
|---|