Documentation

AdapterInterface
in

Cache adapter interface

Tags
category

Pop

author

Nick Sagona, III dev@noladev.com

copyright

Copyright (c) 2009-2025 NOLA Interactive, LLC.

license

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

version
4.0.2

Table of Contents

Methods

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

Methods

getItem()

Get an item from cache

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

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

        
On this page

Search results