Plentymarkets interface documentation
CacheBlocks
ContentCache
Contracts
ContentCacheInvalidationRepositoryContract
Interface for content cache invalidation
Namespace
Plenty\Modules\ContentCache\Contracts
Methods
public invalidateByManufacturerId($manufacturerId, $plentyId = null, $delaySeconds):void
Soft purge all cache entries related to given manufacturer ID.
Name |
Type |
Description |
|
||
|
||
|
public invalidateVariationIds($variationIds, $plentyId = null, $delaySeconds, $invalidateParent = false):void
Completely remove all cache entries related to given variation IDs.
Name |
Type |
Description |
|
IDs of the variation to invalidate cache entries for |
|
|
||
|
||
|
public invalidateItemIds($itemIds, $plentyId = null, $delaySeconds):void
Invalidate cache entries for specified item IDs.
Name |
Type |
Description |
|
||
|
||
|
public invalidateAll($plentyId = null, $bypassActiveCheck = false):void
Invalidate all cache entries related to given plenty ID.
Name |
Type |
Description |
|
||
|
public invalidateUri($uri):void
Invalidate cache entries by URI.
Name |
Type |
Description |
|
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
Register an array of query parameters to be excluded from the content cache.
Name |
Type |
Description |
|
public registerIncluded($queryParams):void
Register an array of query params to be considered when determining the requested cache entry.
Name |
Type |
Description |
|
public getRegistered($key = ""):array
Name |
Type |
Description |
|
'included' or 'excluded' |
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 response so next request on this resource will be delivered from content cache.
Name |
Type |
Description |
|
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 disableCacheForResponse($reason = "", $disableLog = false):void
Disable caching for current response because of any unwanted behavior.
Name |
Type |
Description |
|
Reason why the response is not cached. |
|
|
Option to disable log entries. |
public linkVariationsToResponse($variationIds):void
Link variations to current response.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The plenty id of the client. |
public getSettingsMultiple($plentyIds):void
Get the content cache settings for multiple clients.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The plenty id of the client. |
|
|
Flag that indicates the content cache active state. |
public getInvalidationDate($plentyId):string
Get the date until when the content cache invalidation is deactivated.
Name |
Type |
Description |
|
The plenty id of the client. |
public saveInvalidationDate($plentyId, $invalidationDate):void
Save the date until when the content cache invalidation is deactivated.
Name |
Type |
Description |
|
The plenty id of the client. |
|
|
The date until when the invalidation is deactivated. |
public isInvalidationActive($plentyId):bool
Check if the content cache invalidation is currently active.
Name |
Type |
Description |
|
The plenty id of the client. |
public getInstantInvalidationCount($plentyId):int
Name |
Type |
Description |
|
The plenty id of the client. |
public invalidateInstantly($plentyId):void
Name |
Type |
Description |
|
The plenty id of the client. |