Cache
class Cache (View source)
Methods
Create a cache instance by route path
Check if is HEAD or GET, you can overwrite this method
Write cache
Check HTTP_IF_MODIFIED_SINCE
and HTTP_IF_NONE_MATCH
from server
If true you can send 304 Not Modified
Checks if page (from route) is already cached.
Write data in cache file.
Show cache content from current page (from route) in output
Details
at line 36
void
__construct(int $expires = 900, int $modified = 0, string $prefix = '', bool $querystring = false)
Create a cache instance by route path
at line 110
static protected bool
allowHeaders()
Check if is HEAD or GET, you can overwrite this method
at line 124
void
finish()
Write cache
at line 184
static bool
match(string $modified, string $etag = null)
Check HTTP_IF_MODIFIED_SINCE
and HTTP_IF_NONE_MATCH
from server
If true you can send 304 Not Modified
at line 202
bool
cached()
Checks if page (from route) is already cached.
at line 214
string
write(string $data)
Write data in cache file.
This method returns the set value itself because the class uses ob_start
at line 228
void
show()
Show cache content from current page (from route) in output