Back to Opencart

Class Opencart\System\Library\Cache

docs/api/Opencart.System.Library.Cache.html

4.1.0.33.8 KB
Original Source

Namespaces

Classes

Class Opencart[System](http://localhost\opencart-master/docs/api/namespace-Opencart.System.html)\[Library](http://localhost\opencart-master/docs/api/namespace-Opencart.System.Library.html)\[Cache](http://localhost\opencart-master/docs/api/Opencart.System.Library.Cache.html)

Class Cache

Located at system\library\cache.php

Methods
`
public

			` | `__construct(string $adaptor, int $expire = 3600)`

Constructor

Constructor

Parameters

| $adaptor |

the type of storage for the cache

| | $expire |

Optional parameters

|

| # | | `

public

			` | `get(string $key): mixed`

Get Gets a cache by key name.

Get Gets a cache by key name.

Parameters

| $key |

The cache key name

|

| # | | `

public

			` | `set(string $key, mixed $value, int $expire = 0): void`

Set Sets a cache by key value.

Set Sets a cache by key value.

Parameters

| $key |

The cache key

| | $value |

The cache value

| | $expire |

The cache expiry

|

| # | | `

public

			` | `delete(string $key): void`

Delete Deletes a cache by key name.

Delete Deletes a cache by key name.

Parameters

| $key |

The cache key

|

| # |

OpenCart API API documentation generated by ApiGen dev-master