From f939e46c8571019b32813d50d9098c39077dbab2 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Thu, 7 May 2020 19:43:01 -0400 Subject: [PATCH] Update README with simple usage example --- README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e42c697..fbf2957 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # Banker -A Caching library implementing the PSR-6 interface for several common cache -backends - -[![build status](https://git.timshomepage.net/timw4mail/banker/badges/master/build.svg)](https://git.timshomepage.net/timw4mail/banker/commits/master) -[![coverage report](https://git.timshomepage.net/timw4mail/banker/badges/master/coverage.svg)](https://git.timshomepage.net/timw4mail/banker/commits/master) +A Caching library implementing the PSR-6 and PSR-16 interfaces for several common cache backends ## Cache Backends * Apcu @@ -12,7 +8,23 @@ backends * Redis * Null - no persistence -### Basic Usage +### Basic Usage (SimpleCache/PSR-16) + +```php +get($key, $defaultValue); + +// Save a new value at the specified key +$saved = $cache->set($key, 'newValue'); +``` + +### Basic Usage (Pool/PSR-6) ```php