You are here

public function ECKCache::get in Entity Construction Kit (ECK) 7.2

Same name and namespace in other branches
  1. 7.3 eck.classes.inc \ECKCache::get()

Get something from the cache.

File

./eck.classes.inc, line 845
Classes for all the different objects used in ECK.

Class

ECKCache
A class that manages ECK caches.

Code

public function get() {
  if ($this->data) {
    return $this->data;
  }
  else {
    $cached_data = cache_get($this->id, "cache_eck");
    if ($cached_data) {
      $this->data = $cached_data->data;
      return $this->data;
    }
    else {
      return NULL;
    }
  }
}