Documentation

AbstractAdapter
in package
implements AdapterInterface

AbstractYes

Cache adapter abstract class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
4.0.0

Table of Contents

Interfaces

AdapterInterface
Cache adapter interface

Properties

$ttl  : int
Global time-to-live

Methods

__construct()  : mixed
Constructor
clear()  : AbstractAdapter
Clear all stored values from cache
deleteItem()  : AbstractAdapter
Delete a value in cache
destroy()  : AbstractAdapter
Destroy cache resource
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()  : AbstractAdapter
Save an item to cache
setTtl()  : AbstractAdapter
Set the global time-to-live for the cache adapter

Properties

Methods

__construct()

Constructor

public __construct([int $ttl = 0 ]) : mixed

Instantiate the cache adapter object

Parameters
$ttl : int = 0

getItem()

Get an item from cache

public abstract getItem(string $id) : mixed
Parameters
$id : string

getItemTtl()

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

public abstract 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 abstract hasItem(string $id) : bool
Parameters
$id : string
Return values
bool

saveItem()

Save an item to cache

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

        
On this page

Search results