Example #1
0
 /**
  * Get an item from the storage.
  *
  * @param string $key
  *
  * @return string|null
  */
 public function get($key)
 {
     if ($data = $this->main->get($key)) {
         return $data;
     }
     return $this->fallback->get($key);
 }
Example #2
0
 /**
  * Get an item from the storage.
  *
  * @param string $key
  *
  * @return string|null
  */
 public function get($key)
 {
     $data = $this->cache->remember("store.{$key}", 30, function () use($key) {
         return $this->store->get($key);
     });
     if ($data) {
         return $data;
     }
 }
Example #3
0
 /**
  * Get an item from the storage.
  *
  * @param string $key
  *
  * @return string|null
  */
 public function get($key)
 {
     if ($data = $this->store->get($key)) {
         return $this->encrypter->decrypt($data);
     }
 }
Example #4
0
 /**
  * Get an item from the storage.
  *
  * @param string $key
  *
  * @return string|null
  */
 public function get($key)
 {
     if ($data = $this->store->get($key)) {
         return $this->compressor->uncompress($data);
     }
 }