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.

ContentCache

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.

Contracts

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

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.

ContentCacheSettingsRepositoryContract

Interface for content cache settings

Namespace

Plenty\Modules\ContentCache\Contracts

Methods

public getSettings(int $plentyId):ContentCacheSettings

Get the content cache settings for the specified client.

Parameters
int $plentyId The plenty id of the client.
public getSettingsMultiple(array $plentyIds):void

Get the content cache settings for multiple clients.

Parameters
array $plentyIds The plenty ids of the clients.
public saveSettings(int $plentyId, bool $contentCacheActive):ContentCacheSettings

Save the content cache settings for the specified client.

Parameters
int $plentyId The plenty id of the client.
bool $contentCacheActive Flag that indicates the content cache active state.
public getInvalidationDate(int $plentyId):string

Get the date until when the content cache invalidation is deactivated.

Parameters
int $plentyId The plenty id of the client.
public saveInvalidationDate(int $plentyId, string $invalidationDate):void

Save the date until when the content cache invalidation is deactivated.

Parameters
int $plentyId The plenty id of the client.
string $invalidationDate The date until when the invalidation is deactivated.
public isInvalidationActive(int $plentyId):bool

Check if the content cache invalidation is currently active.

Parameters
int $plentyId The plenty id of the client.