/** * Forget a cached model. */ public static function forgetModel(RedBeanModel $model) { $modelIdentifier = $model->getModelIdentifier(); if (PHP_CACHING_ON) { unset(self::$modelIdentifiersToModels[$modelIdentifier]); } if (MEMCACHE_ON && Yii::app()->cache !== null) { Yii::app()->cache->delete('M:' . $modelIdentifier, 0); } }
/** * Forget a cached model. */ public static function forgetModel(RedBeanModel $model) { $modelIdentifier = $model->getModelIdentifier(); if (PHP_CACHING_ON) { unset(self::$modelIdentifiersToModels[$modelIdentifier]); } if (MEMCACHE_ON && Yii::app()->cache !== null) { $prefix = self::getCachePrefix($modelIdentifier, self::$cacheType); Yii::app()->cache->delete($prefix . $modelIdentifier); } }
/** * Forget a cached model. */ public static function forgetModel(RedBeanModel $model) { $modelIdentifier = $model->getModelIdentifier(); static::forgetModelByIdentifier($modelIdentifier); }