public static function video_utility::clearEntityCache in Video 7.2
Clears all caches associated with a certain entity.
Parameters
$type: Entity type
$id: Entity ID
2 calls to video_utility::clearEntityCache()
- TranscoderAbstractionFactoryZencoder::processPostback in transcoders/
TranscoderAbstractionFactoryZencoder.inc - Process postback jobs
- video_jobs::setCompletedOrFailed in includes/
jobs.inc
File
- ./
video.utility.inc, line 34 - This file will be used to keep all utility functions data structures.
Class
- video_utility
- Helper functions for the Video module.
Code
public static function clearEntityCache($type, $id) {
// Clear the entity controller cache
entity_get_controller($type)
->resetCache(array(
$id,
));
// Clear field cache
cache_clear_all('field:' . $type . ':' . $id, 'cache_field');
// Clear page cache and block cache
cache_clear_all(NULL, NULL);
if (module_exists('entitycache')) {
// Clear entitycache cache
cache_clear_all($id, 'cache_entity_' . $type);
}
}