File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55use League \Flysystem \Filesystem ;
66use League \Flysystem \UnableToReadFile ;
77use Sammyjo20 \SaloonCachePlugin \Data \CachedResponse ;
8- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
8+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
99
10- class FlysystemDriverInterface implements CacheDriverInterface
10+ class FlysystemDriver implements DriverInterface
1111{
1212 /**
1313 * @param Filesystem $store
Original file line number Diff line number Diff line change 44
55use Illuminate \Contracts \Cache \Repository ;
66use Sammyjo20 \SaloonCachePlugin \Data \CachedResponse ;
7- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
7+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
88
9- class LaravelCacheDriverInterface implements CacheDriverInterface
9+ class LaravelCacheDriver implements DriverInterface
1010{
1111 /**
1212 * @param Repository $store
Original file line number Diff line number Diff line change 44
55use Psr \SimpleCache \CacheInterface ;
66use Sammyjo20 \SaloonCachePlugin \Data \CachedResponse ;
7- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
7+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
88
99/**
1010 * PSR-16 Cache Driver
1111 */
12- class SimpleCacheDriverInterface implements CacheDriverInterface
12+ class SimpleCacheDriver implements DriverInterface
1313{
1414 /**
1515 * @param CacheInterface $store
Original file line number Diff line number Diff line change 88use GuzzleHttp \Promise \FulfilledPromise ;
99use Sammyjo20 \Saloon \Http \SaloonRequest ;
1010use Sammyjo20 \SaloonCachePlugin \Data \CachedResponse ;
11- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
11+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
1212
1313class ExplicitCacheMiddleware
1414{
@@ -22,9 +22,9 @@ class ExplicitCacheMiddleware
2222 /**
2323 * The cache driver used for caching.
2424 *
25- * @var CacheDriverInterface
25+ * @var DriverInterface
2626 */
27- protected CacheDriverInterface $ cacheDriver ;
27+ protected DriverInterface $ cacheDriver ;
2828
2929 /**
3030 * The TTL in seconds.
Original file line number Diff line number Diff line change 44
55use Sammyjo20 \SaloonCachePlugin \Data \CachedResponse ;
66
7- interface CacheDriverInterface
7+ interface DriverInterface
88{
99 /**
1010 * Store the cached response on the driver.
Original file line number Diff line number Diff line change 55use Sammyjo20 \Saloon \Constants \Saloon ;
66use Sammyjo20 \Saloon \Http \SaloonRequest ;
77use Sammyjo20 \Saloon \Http \SaloonResponse ;
8- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
8+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
99use Sammyjo20 \SaloonCachePlugin \Http \Middleware \ExplicitCacheMiddleware ;
1010
1111trait AlwaysCacheResponses
@@ -145,7 +145,7 @@ public function invalidateCache(): self
145145 *
146146 * @return mixed
147147 */
148- abstract public function cacheDriver (): CacheDriverInterface ;
148+ abstract public function cacheDriver (): DriverInterface ;
149149
150150 /**
151151 * Define the cache TTL (Time-to-live) in seconds.
Original file line number Diff line number Diff line change 55use League \Flysystem \Filesystem ;
66use Sammyjo20 \Saloon \Http \SaloonConnector ;
77use League \Flysystem \Local \LocalFilesystemAdapter ;
8- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
9- use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriverInterface ;
8+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
9+ use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriver ;
1010use Sammyjo20 \SaloonCachePlugin \Traits \AlwaysCacheResponses ;
1111
1212class CachedConnector extends SaloonConnector
@@ -18,9 +18,9 @@ public function defineBaseUrl(): string
1818 return testApi ();
1919 }
2020
21- public function cacheDriver (): CacheDriverInterface
21+ public function cacheDriver (): DriverInterface
2222 {
23- return new FlysystemDriverInterface (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
23+ return new FlysystemDriver (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
2424 }
2525
2626 public function cacheTTLInSeconds (): int
Original file line number Diff line number Diff line change 66use Sammyjo20 \Saloon \Constants \Saloon ;
77use Sammyjo20 \Saloon \Http \SaloonRequest ;
88use League \Flysystem \Local \LocalFilesystemAdapter ;
9- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
10- use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriverInterface ;
9+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
10+ use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriver ;
1111use Sammyjo20 \SaloonCachePlugin \Traits \AlwaysCacheResponses ;
1212use Sammyjo20 \SaloonCachePlugin \Tests \Fixtures \Connectors \TestConnector ;
1313
@@ -24,9 +24,9 @@ public function defineEndpoint(): string
2424 return '/user ' ;
2525 }
2626
27- public function cacheDriver (): CacheDriverInterface
27+ public function cacheDriver (): DriverInterface
2828 {
29- return new FlysystemDriverInterface (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
29+ return new FlysystemDriver (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
3030 }
3131
3232 public function cacheTTLInSeconds (): int
Original file line number Diff line number Diff line change 77use Sammyjo20 \Saloon \Http \SaloonRequest ;
88use Sammyjo20 \Saloon \Traits \Plugins \HasJsonBody ;
99use League \Flysystem \Local \LocalFilesystemAdapter ;
10- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
11- use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriverInterface ;
10+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
11+ use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriver ;
1212use Sammyjo20 \SaloonCachePlugin \Traits \AlwaysCacheResponses ;
1313use Sammyjo20 \SaloonCachePlugin \Tests \Fixtures \Connectors \TestConnector ;
1414
@@ -33,9 +33,9 @@ public function defaultData(): array
3333 ];
3434 }
3535
36- public function cacheDriver (): CacheDriverInterface
36+ public function cacheDriver (): DriverInterface
3737 {
38- return new FlysystemDriverInterface (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
38+ return new FlysystemDriver (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
3939 }
4040
4141 public function cacheTTLInSeconds (): int
Original file line number Diff line number Diff line change 66use Sammyjo20 \Saloon \Constants \Saloon ;
77use Sammyjo20 \Saloon \Http \SaloonRequest ;
88use League \Flysystem \Local \LocalFilesystemAdapter ;
9- use Sammyjo20 \SaloonCachePlugin \Interfaces \CacheDriverInterface ;
10- use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriverInterface ;
9+ use Sammyjo20 \SaloonCachePlugin \Interfaces \DriverInterface ;
10+ use Sammyjo20 \SaloonCachePlugin \Drivers \FlysystemDriver ;
1111use Sammyjo20 \SaloonCachePlugin \Traits \AlwaysCacheResponses ;
1212use Sammyjo20 \SaloonCachePlugin \Tests \Fixtures \Connectors \TestConnector ;
1313
@@ -24,9 +24,9 @@ public function defineEndpoint(): string
2424 return '/user ' ;
2525 }
2626
27- public function cacheDriver (): CacheDriverInterface
27+ public function cacheDriver (): DriverInterface
2828 {
29- return new FlysystemDriverInterface (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
29+ return new FlysystemDriver (new Filesystem (new LocalFilesystemAdapter (cachePath ())));
3030 }
3131
3232 public function cacheTTLInSeconds (): int
You can’t perform that action at this time.
0 commit comments