PHP Class Smile\ElasticsuiteCore\Helper\Cache

Author: Aurelien FOUCRET ([email protected])
Inheritance: extends Magento\Framework\App\Helper\AbstractHelper
Exibir arquivo Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Framework\App\Helper\Context $context, Magento\Framework\App\CacheInterface $cache, IndexSettings $indexSettingsHelper ) Constructor.
cleanIndexCache ( string $indexIdentifier, string $storeId ) : void Clean the cache by index identifier and store.
loadCache ( string $cacheKey ) : mixed Load data from the cache
saveCache ( string $cacheKey, mixed $data, string[] $cacheTags, integer $lifetime = self::DEFAULT_LIFETIME ) Save some data into an index cache.

Private Methods

Method Description
getCacheTags ( string $indexIdentifier, string $storeId ) : string[] Get cache tag by index identifier / store.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\App\Helper\Context $context, Magento\Framework\App\CacheInterface $cache, IndexSettings $indexSettingsHelper )
$context Magento\Framework\App\Helper\Context Helper context.
$cache Magento\Framework\App\CacheInterface Cache manager.
$indexSettingsHelper IndexSettings Index settings helper.

cleanIndexCache() public method

Clean the cache by index identifier and store.
public cleanIndexCache ( string $indexIdentifier, string $storeId ) : void
$indexIdentifier string Index identifier.
$storeId string Store id.
return void

loadCache() public method

Load data from the cache
public loadCache ( string $cacheKey ) : mixed
$cacheKey string Cache key.
return mixed

saveCache() public method

Save some data into an index cache.
public saveCache ( string $cacheKey, mixed $data, string[] $cacheTags, integer $lifetime = self::DEFAULT_LIFETIME )
$cacheKey string Cache key.
$data mixed Data.
$cacheTags string[] Cache tags.
$lifetime integer Cache lifetime.