Skip to content

Commit

Permalink
Merge pull request #1 from sarahman/master
Browse files Browse the repository at this point in the history
README.md file has been created.
@sarahman great. Thank you.
  • Loading branch information
shahariaazam authored Nov 13, 2017
2 parents 92b492e + 5994aec commit f37ac50
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## 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
- 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:
```php
<?php

require "vendor/autoload.php";

$cache = new Memcached();
$cache->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)

1 comment on commit f37ac50

@sarahman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shahariaazam welcome, brother.

Please sign in to comment.