Plentymarkets interface documentation

Eloquent model representing a Content Cache Link.

Namespace

Plenty\Modules\ContentCache\ContentCacheLink\Models

Properties
Name Type Description

id

int

plentyId

int

linkType

string

cacheKey

string

linkId

int

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
Name Type Description

plentyId

int

contentCacheActive

bool

Methods
public toArray()

Returns this model as an array.

Contracts

ContentCacheInvalidationRepositoryContract

Interface for content cache invalidation

Namespace

Plenty\Modules\ContentCache\Contracts

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

Invalidate all cache entries related to given variation IDs.

Parameters

Name

Type

Description

$variationIds

array

IDs of the variation to invalidate cache entries for

$plentyId

int

public invalidateItemIds($itemIds, $plentyId = null):void

Invalidate cache entries for specified item IDs.

Parameters

Name

Type

Description

$itemIds

array

$plentyId

int

public invalidateAll($plentyId = null):void

Invalidate all cache entries related to given plenty ID.

Parameters

Name

Type

Description

$plentyId

int

public invalidateUri($uri):void

Invalidate cache entries by URI.

Parameters

Name

Type

Description

$uri

string

public storeInvalidationStacks():void

Store all collected invalidation entries in the database.

ContentCacheQueryParamsRepositoryContract

Interface for registering request query parameters which should be handled by the content cache

Namespace

Plenty\Modules\ContentCache\Contracts

Methods
public registerExcluded($queryParams):void
Parameters

Name

Type

Description

$queryParams

array

public registerIncluded($queryParams):void
Parameters

Name

Type

Description

$queryParams

array

ContentCacheRepositoryContract

Save and retrieve values to or from the content cache

Namespace

Plenty\Modules\ContentCache\Contracts

Methods
public enableCacheForResponse($options = []):void

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

Parameters

Name

Type

Description

$options

array

Additional options to be considered when handling cache entries. Possible options are: - enableQueryParams: boolean Set to true to enable caching pages having query params.

public linkVariationsToResponse($variationIds):void

Link variations to current response.

Parameters

Name

Type

Description

$variationIds

array

Ids of variations referenced by the current response.

ContentCacheSettingsRepositoryContract

Interface for content cache settings

Namespace

Plenty\Modules\ContentCache\Contracts

Methods
public getSettings($plentyId):Plenty\Modules\ContentCache\ContentCacheSettings\ContentCacheSettings
Return type: ContentCacheSettings

Get the content cache settings for the specified client.

Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

public getSettingsMultiple($plentyIds):void

Get the content cache settings for multiple clients.

Parameters

Name

Type

Description

$plentyIds

array

The plenty ids of the clients.

public saveSettings($plentyId, $contentCacheActive):Plenty\Modules\ContentCache\ContentCacheSettings\ContentCacheSettings
Return type: ContentCacheSettings

Save the content cache settings for the specified client.

Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

$contentCacheActive

bool

Flag that indicates the content cache active state.

public getInvalidationDate($plentyId):string

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

Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

public saveInvalidationDate($plentyId, $invalidationDate):void

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

Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

$invalidationDate

string

The date until when the invalidation is deactivated.

public isInvalidationActive($plentyId):bool

Check if the content cache invalidation is currently active.

Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

public getInstantInvalidationCount($plentyId):int
Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.

public invalidateInstantly($plentyId):void
Parameters

Name

Type

Description

$plentyId

int

The plenty id of the client.