Gdn::cache PHP Method

cache() public static method

Get the cache object
public static cache ( ) : Gdn_Cache
return Gdn_Cache
    public static function cache()
    {
        return self::factory(self::AliasCache);
    }

Usage Example

Example #1
0
 /**
  * Initialize a new instance of the {@link CategoryCollection} class.
  *
  * @param Gdn_SQLDriver|null $sql The database layer dependency.
  * @param Gdn_Cache|null $cache The cache layer dependency.
  */
 public function __construct(Gdn_SQLDriver $sql = null, Gdn_Cache $cache = null)
 {
     if ($sql === null) {
         $sql = Gdn::sql();
     }
     $this->sql = $sql;
     if ($cache === null) {
         $cache = Gdn::cache();
     }
     $this->cache = $cache;
 }
All Usage Examples Of Gdn::cache