public static function Messaging_Cached_Object::object_load in Messaging 6.4
Load object by unique key, may have static caching
Overrides Messaging_Object::object_load
1 call to Messaging_Cached_Object::object_load()
- Messaging_Destination::load in includes/
messaging_destination.class.inc - Load object from database
File
- includes/
messaging_object.class.inc, line 281 - Drupal Messaging Framework - Base classes
Class
- Messaging_Cached_Object
- Class with static caching
Code
public static function object_load($table, $key, $value, $class) {
$cached = self::object_cache_get($class, $value);
if (isset($cached)) {
return $cached;
}
elseif ($object = parent::object_load($table, $key, $value, $class)) {
$object
->cache_save();
return $object;
}
else {
self::object_cache_set($class, $value, FALSE);
}
}