From c7636337533241ec3e22732ce34e532c232fbf11 Mon Sep 17 00:00:00 2001 From: "Mohit K.Singh" Date: Tue, 1 Jul 2014 13:17:42 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bef86af..f55f1a4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ using composer add ``` "require" : { ... - "mohit-singh/zf2auth-acl": "V1.0.0" + "mohit-singh/zf2auth-acl": "V1.0.1" } ``` then copy and rename the following, @@ -131,4 +131,38 @@ $roleAtuth->getUserValidRole(); $roleAtuth->switchRole('ADMIN'); ``` +It Also provide cache mechanism to store role, resource and permission in cache. +you can configure the caching here + +```php + /** + * This cache is used the disk file system to store date with the following options. + */ + 'fileCache' => array( + 'cache_dir' => './data/cache', + 'namespace' => 'systemCache', + 'dir_level' => 2, + 'filePermission' => 0666, + 'dirPermission' => 0755 + ), +``` +you can also access file system cache in your project like this + +```php + +// store item in filesystem cache + $this->getServiceLocator()->get('Zend\Cache\Storage\Filesystem')->setItem('foo', 'taxi'); + + +// get item from filesystem cache + echo 'Cached Item is:- '.$this->getServiceLocator()->get('Zend\Cache\Storage\Filesystem')->getItem('foo'); + +``` + +you are using file system cache so you have to give permission to the cache folder + +``` +> sudo chmod -R 0777 data/cache +``` + From fa77bb9b3bb396ff5db679e379e8640a63156586 Mon Sep 17 00:00:00 2001 From: "Mohit K.Singh" Date: Tue, 1 Jul 2014 18:17:08 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f55f1a4..3224bb4 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,15 @@ using composer add "mohit-singh/zf2auth-acl": "V1.0.1" } ``` +Enable the module in application.config.php + +```php + 'modules' => array( + ... + 'ZF2AuthAcl' + ), +``` + then copy and rename the following, ``` copy vendor/mohit-singh/zf2auth-acl/config/aclAuth.local.php.dist to config/autoload/aclAuth.local.php