You are here

public function RestfulEntityBase::clearResourceRenderedCacheEntity in RESTful 7

Clear all caches corresponding to the current resource for a given entity.

Parameters

int $id: The entity ID.

File

plugins/restful/RestfulEntityBase.php, line 1497
Contains RestfulEntityBase.

Class

RestfulEntityBase
An abstract implementation of RestfulEntityInterface.

Code

public function clearResourceRenderedCacheEntity($id) {

  // Build the cache ID.
  $version = $this
    ->getVersion();
  $cid = 'v' . $version['major'] . '.' . $version['minor'] . '::' . $this
    ->getResourceName() . '::uu' . $this
    ->getAccount()->uid . '::paet:';
  $cid .= $this
    ->getEntityType();
  $cid .= '::ei:' . $id;
  $this
    ->cacheInvalidate($cid);
}