Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

ACL cache production environment

I am pulling a GIT repository on a production system for automatic deployment. My problem is that the old ACL stays in memory. Is there any way to reload the ACL via command line?



83.4k
Accepted
answer

If you're storing ACLs in session, it will probably hard to reset them when they change, you can better use Memcached/Redis/APC to store them and then purge the cache to force users to reload the new ACL.

Thanks for the answer. This is actually a great idea. For others beginners like me who are searching as well, there is an adapter for database as well:

https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Acl/Adapter

But redis is of course more performant, so this should be the first choice. After some testing I have also notices that the cache of the ACL is reloaded after some time on the live system (something between 30 minutes and 2 hours).

If you're storing ACLs in session, it will probably hard to reset them when they change, you can better use Memcached/Redis/APC to store them and then purge the cache to force users to reload the new ACL.