We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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?



98.9k
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.