13. Class

13.1. Zend\Cache\Storage\Adapter\Apc

13.1.1. Methods

13.1.1.1. __construct

__construct()

Constructor

Parameters:null|array|Traversable|ApcOptions
Throws ExceptionExceptionInterface:
 

13.1.1.2. setOptions

setOptions()

Set options.

Parameters:array|Traversable|ApcOptions
Return type:Apc
See :

13.1.1.3. getOptions

getOptions()

Get options.

Return type:ApcOptions
See :

13.1.1.4. getTotalSpace

getTotalSpace()

Get total space in bytes

Return type:int|float

13.1.1.5. getAvailableSpace

getAvailableSpace()

Get available space in bytes

Return type:int|float

13.1.1.6. getIterator

getIterator()

Get the storage iterator

Return type:ApcIterator

13.1.1.7. flush

flush()

Flush the whole storage

Return type:bool

13.1.1.8. clearByNamespace

clearByNamespace()

Remove items by given namespace

Parameters:string
Return type:bool

13.1.1.9. clearByPrefix

clearByPrefix()

Remove items matching given prefix

Parameters:string
Return type:bool

13.1.1.10. internalGetItem

internalGetItem()

Internal method to get an item.

Parameters:
  • string
  • bool
  • mixed
Return type:

mixed Data on success, null on failure

Throws :

ExceptionExceptionInterface

13.1.1.11. internalGetItems

internalGetItems()

Internal method to get multiple items.

Parameters:array
Return type:array Associative array of keys and values
Throws :ExceptionExceptionInterface

13.1.1.12. internalHasItem

internalHasItem()

Internal method to test if an item exists.

Parameters:string
Return type:bool
Throws :ExceptionExceptionInterface

13.1.1.13. internalHasItems

internalHasItems()

Internal method to test multiple items.

Parameters:array
Return type:array Array of found keys
Throws :ExceptionExceptionInterface

13.1.1.14. internalGetMetadata

internalGetMetadata()

Get metadata of an item.

Parameters:string
Return type:array|bool Metadata on success, false on failure
Throws :ExceptionExceptionInterface

13.1.1.15. internalGetMetadatas

internalGetMetadatas()

Get metadata of multiple items

Parameters:array
Return type:array Associative array of keys and metadata

@triggers getMetadatas.pre(PreEvent) @triggers getMetadatas.post(PostEvent) @triggers getMetadatas.exception(ExceptionEvent)

13.1.1.16. internalSetItem

internalSetItem()

Internal method to store an item.

Parameters:
  • string
  • mixed
Return type:

bool

Throws :

ExceptionExceptionInterface

13.1.1.17. internalSetItems

internalSetItems()

Internal method to store multiple items.

Parameters:array
Return type:array Array of not stored keys
Throws :ExceptionExceptionInterface

13.1.1.18. internalAddItem

internalAddItem()

Add an item.

Parameters:
  • string
  • mixed
Return type:

bool

Throws :

ExceptionExceptionInterface

13.1.1.19. internalAddItems

internalAddItems()

Internal method to add multiple items.

Parameters:array
Return type:array Array of not stored keys
Throws :ExceptionExceptionInterface

13.1.1.20. internalReplaceItem

internalReplaceItem()

Internal method to replace an existing item.

Parameters:
  • string
  • mixed
Return type:

bool

Throws :

ExceptionExceptionInterface

13.1.1.21. internalRemoveItem

internalRemoveItem()

Internal method to remove an item.

Parameters:string
Return type:bool
Throws :ExceptionExceptionInterface

13.1.1.22. internalRemoveItems

internalRemoveItems()

Internal method to remove multiple items.

Parameters:array
Return type:array Array of not removed keys
Throws :ExceptionExceptionInterface

13.1.1.23. internalIncrementItem

internalIncrementItem()

Internal method to increment an item.

Parameters:
  • string
  • int
Return type:

int|bool The new value on success, false on failure

Throws :

ExceptionExceptionInterface

13.1.1.24. internalDecrementItem

internalDecrementItem()

Internal method to decrement an item.

Parameters:
  • string
  • int
Return type:

int|bool The new value on success, false on failure

Throws :

ExceptionExceptionInterface

13.1.1.25. internalGetCapabilities

internalGetCapabilities()

Internal method to get capabilities of this adapter

Return type:Capabilities

13.1.1.26. normalizeMetadata

normalizeMetadata()

Normalize metadata to work with APC

Parameters:array
Return type:void