Documentation

File extends AbstractAdapter
in package

File adapter cache class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
3.4.0

Table of Contents

$dir  : string
Cache dir
$ttl  : int
Global time-to-live
__construct()  : mixed
Constructor
clear()  : File
Clear all stored values from cache
deleteItem()  : File
Delete a value in cache
destroy()  : File
Destroy cache resource
getDir()  : string
Get the current cache dir
getItem()  : mixed
Get an item from cache
getItemTtl()  : int
Get the time-to-live for an item in cache
getTtl()  : int
Get the global time-to-live for the cache object
hasItem()  : bool
Determine if the item exist in cache
saveItem()  : File
Save an item to cache
setDir()  : File
Set the current cache dir
setTtl()  : AbstractAdapter
Set the global time-to-live for the cache adapter

Properties

$dir

Cache dir

protected string $dir = null

Methods

__construct()

Constructor

public __construct(string $dir, int $ttl) : mixed

Instantiate the cache file object

Parameters
$dir : string
$ttl : int
Return values
mixed

clear()

Clear all stored values from cache

public clear() : File
Return values
File

deleteItem()

Delete a value in cache

public deleteItem(string $id) : File
Parameters
$id : string
Return values
File

destroy()

Destroy cache resource

public destroy() : File
Return values
File

getDir()

Get the current cache dir

public getDir() : string
Return values
string

getItem()

Get an item from cache

public getItem(string $id) : mixed
Parameters
$id : string
Return values
mixed

getItemTtl()

Get the time-to-live for an item in cache

public getItemTtl(string $id) : int
Parameters
$id : string
Return values
int

getTtl()

Get the global time-to-live for the cache object

public getTtl() : int
Return values
int

hasItem()

Determine if the item exist in cache

public hasItem(string $id) : bool
Parameters
$id : string
Return values
bool

saveItem()

Save an item to cache

public saveItem(string $id, mixed $value[, int $ttl = null ]) : File
Parameters
$id : string
$value : mixed
$ttl : int = null
Return values
File

setDir()

Set the current cache dir

public setDir(string $dir) : File
Parameters
$dir : string
Tags
throws
Exception
Return values
File

Search results