PHP Class Imbo\EventListener\ImageTransformationCache
Event listener that stores transformed images to disk. By using this listener Imbo will only
have to generate each transformation once. The listener is also responsible for deleting images
from the cache when the original images are deleted through the API.
The values used to generate the unique cache key for each image are:
- user
- image identifier
- normalized accept header
- image extension (can be null)
- image transformations (can be null)
Datei anzeigen
Open project: imbo/imbo
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( array $params ) |
Class constructor |
|
deleteFromCache ( Imbo\EventManager\EventInterface $event ) |
Delete cached images from the cache |
|
getSubscribedEvents ( ) |
|
|
loadFromCache ( Imbo\EventManager\EventInterface $event ) |
Load transformed images from the cache |
|
storeInCache ( Imbo\EventManager\EventInterface $event ) |
Store transformed images in the cache |
|
Private Methods
Method Details
__construct()
public method
deleteFromCache()
public method
Delete cached images from the cache
public deleteFromCache ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
The current event |
getSubscribedEvents()
public static method
loadFromCache()
public method
Load transformed images from the cache
public loadFromCache ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
The current event |
storeInCache()
public method
Store transformed images in the cache
public storeInCache ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
The current event |