ContentCache

Contracts

ContentCacheSettingsRepositoryContract

Interface for content cache settings

Namespace

Plenty\Modules\ContentCache\Contracts

Methods

public getSettings(int $plentyId):ContentCacheSettings
Parameters
int $plentyId
public getSettingsMultiple(array $plentyIds):void
Parameters
array $plentyIds
public saveSettings(int $plentyId, bool $contentCacheActive):ContentCacheSettings
Parameters
int $plentyId
bool $contentCacheActive

ContentCacheRepositoryContract

Save and retrieve values to or from the content cache

Namespace

Plenty\Modules\ContentCache\Contracts

Methods

public enableCacheForResponse():void

Enable content caching for current response so next request on this resource will be delivered from content cache.

public linkVariationsToResponse(array $variationIds):void

Link variations to current response.

Parameters
array $variationIds Ids of variations referenced by the current response.

ContentCacheInvalidationRepositoryContract

Interface for content cache invalidation

Namespace

Plenty\Modules\ContentCache\Contracts

Methods

public invalidateVariationIds(array $variationIds, int $plentyId = null):void

Invalidate all cache entries related to given variation ids.

Parameters
array $variationIds Ids of the variation to invalidate cache entries for
int $plentyId
public invalidateItemIds(array $itemIds, int $plentyId = null):void
Parameters
array $itemIds
int $plentyId
public invalidateAll(int $plentyId = null):void

Invalidate all cache entries related to given plenty id.

Parameters
int $plentyId
public invalidateUri(string $uri):void

Invalidate cache entries by URI

Parameters
string $uri
public storeInvalidationStacks():void

ContentCacheSettings

ContentCacheSettings

Eloquent model representing the Content Cache Settings.

Namespace

Plenty\Modules\ContentCache\ContentCacheSettings

Properties

Type Name Description
int plentyId
bool contentCacheActive

Methods

public toArray()

Returns this model as an array.

ContentCacheLink

Models

ContentCacheLink

Eloquent model representing a Content Cache Link.

Namespace

Plenty\Modules\ContentCache\ContentCacheLink\Models

Properties

Type Name Description
int id
int plentyId
string linkType
string cacheKey
int linkId

Methods

public toArray()

Returns this model as an array.