Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Added a facade for caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Drost committed Aug 29, 2018
1 parent d984eb2 commit d2f0f59
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/Facades/Cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace RobinDrost\PrismicEloquent\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @method static bool has(string $key)
* @method static mixed get(string $key)
* @method static mixed set(string $key, mixed $value, int $ttl = 0)
* @method static bool delete(string $key)
* @method static bool clear()
*
* @see \RobinDrost\PrismicEloquent\Cache
*/
class Cache extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'prismiceloquent.cache';
}
}
2 changes: 1 addition & 1 deletion tests/ModelIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ public static function getTypeName() : string
{
return 'test';
}
}
}

0 comments on commit d2f0f59

Please sign in to comment.