Example #1
0
 /**
  * List out all the projects.
  *
  * @return \Illuminate\Support\Collection
  */
 public function all()
 {
     if ($projects = Cache::get('projects')) {
         return $projects;
     }
     $projects = $this->objectify($this->request('GET', '/projects.xml')['project']);
     Cache::put('projects', $projects);
     return $projects;
 }
Example #2
0
 /**
  * Cache the farewell log for today.
  *
  * @return void
  */
 private function cacheTimeOut()
 {
     Cache::put('time:out', true);
 }
Example #3
0
<?php

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require __DIR__ . '/vendor/autoload.php';
} else {
    if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
        require __DIR__ . '/../vendor/autoload.php';
    } else {
        require __DIR__ . '/../../../vendor/autoload.php';
    }
}
use Dotenv\Dotenv;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Cache\FileStore;
use Illuminate\Cache\Repository as IlluminateCache;
use Work\Cache\Cache;
(new Dotenv(getenv('HOME'), '.workrc'))->load();
Filesystem::macro('touch', function ($filename) {
    $this->append($filename, '');
});
if ((new Filesystem())->exists('.work')) {
    (new Dotenv(getcwd(), '.work'))->load();
}
$filestore = new FileStore(new Filesystem(), getenv('CACHE'));
Cache::setCacheRepository(new IlluminateCache($filestore));
Example #4
0
 /**
  * Cache the greeting log for today.
  *
  * @return void
  */
 private function cacheTimeIn()
 {
     Cache::put("time:in", true);
 }