Example #1
0
 public function setUp()
 {
     if (!\extension_loaded('memcache')) {
         $this->markTestSkipped('The memcache extension is not available');
         return;
     }
     //parent::setUp($connection_name);
     // Config::instance()->setCache('memcache://localhost');
     // Cache::initialize('memcache://localhost');
     Config::instance()->setCache('memcache://127.0.0.1');
     Cache::initialize('memcache://127.0.0.1');
     Cache::set("1337", "abcd");
 }
Example #2
0
 protected function updateCache()
 {
     $table = static::table();
     if ($table->cache_individual_model) {
         Cache::set($this->cacheKey(), $this, $table->cache_model_expire);
     }
 }