From 5b59f5a17a604c51425c4fdfd88600cff2eeb6c5 Mon Sep 17 00:00:00 2001 From: Syed Abidur Rahman Date: Mon, 13 Nov 2017 19:56:11 +0600 Subject: [PATCH 1/2] README.md file has been created for this repo. --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8045cc6 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +PHP Cache library built by PSR-16 simple cache interface + +You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package. + +#### Installation +- Clone the repository from Github (https://github.com/PreviewTechnologies/simple-cache) +- Run this command: `composer install` + +#### Usages +- Create a file named `test.php` in your root directory and add these following codes: +```php +addServers([ + ['localhost', 11211, 1] +]); + +$cache = new Previewtechs\SimpleCache\Memcached($cache); + +// Set Cache key. +$data = [ + 'sample' => 'data', + 'another' => 'data' +]; + +$cache->set('your_custom_key', $data); + +// Check cached key exists or not. +$cache->has('your_custom_key'); + +// Get Cached key data. +$cache->get('your_custom_key'); + +``` +- then run `php test.php` + +#### For Documentations +[psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) \ No newline at end of file From 5994aec56956bba43218469f475f2dbc09d3038e Mon Sep 17 00:00:00 2001 From: Syed Abidur Rahman Date: Mon, 13 Nov 2017 20:22:58 +0600 Subject: [PATCH 2/2] README.md file has been updated. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8045cc6..153604b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ +## Simple Cache Client Adapter ## PHP Cache library built by PSR-16 simple cache interface You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package. #### Installation -- Clone the repository from Github (https://github.com/PreviewTechnologies/simple-cache) -- Run this command: `composer install` +- Run this command: `composer require previewtechs/simple-cache:dev-master` #### Usages - Create a file named `test.php` in your root directory and add these following codes: