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

Commit d2f0f59

Browse files
author
Robin Drost
committed
Added a facade for caching.
1 parent d984eb2 commit d2f0f59

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/Facades/Cache.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace RobinDrost\PrismicEloquent\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @method static bool has(string $key)
9+
* @method static mixed get(string $key)
10+
* @method static mixed set(string $key, mixed $value, int $ttl = 0)
11+
* @method static bool delete(string $key)
12+
* @method static bool clear()
13+
*
14+
* @see \RobinDrost\PrismicEloquent\Cache
15+
*/
16+
class Cache extends Facade
17+
{
18+
/**
19+
* Get the registered name of the component.
20+
*
21+
* @return string
22+
*/
23+
protected static function getFacadeAccessor()
24+
{
25+
return 'prismiceloquent.cache';
26+
}
27+
}

tests/ModelIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ public static function getTypeName() : string
170170
{
171171
return 'test';
172172
}
173-
}
173+
}

0 commit comments

Comments
 (0)