diff --git a/README.md b/README.md index a9ebc22..03a24d9 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ class LaravelCache implements CacheInterface public function set(string $key, $value, int $ttl = 3600): bool { // Laravel TTL is in minutes - return Cache::put($key, $value, $ttl / 60); + return Cache::put($key, $value, max(1, ceil($ttl / 60))); } public function delete(string $key): bool diff --git a/src/SDK/Cache/APCuCache.php b/src/SDK/Cache/APCuCache.php index 17e3d1a..082ae58 100644 --- a/src/SDK/Cache/APCuCache.php +++ b/src/SDK/Cache/APCuCache.php @@ -18,4 +18,4 @@ public function delete(string $key): bool { return apcu_delete($key); } -} \ No newline at end of file +} diff --git a/src/SDK/Cache/CacheInterface.php b/src/SDK/Cache/CacheInterface.php index 6ec9d71..d7c6414 100644 --- a/src/SDK/Cache/CacheInterface.php +++ b/src/SDK/Cache/CacheInterface.php @@ -7,4 +7,4 @@ interface CacheInterface public function get(string $key); public function set(string $key, $value, int $ttl = 3600): bool; public function delete(string $key): bool; -} \ No newline at end of file +} diff --git a/src/SDK/Cache/LaravelCache.php b/src/SDK/Cache/LaravelCache.php deleted file mode 100644 index 7fa9847..0000000 --- a/src/SDK/Cache/LaravelCache.php +++ /dev/null @@ -1,23 +0,0 @@ -