caching - Symfony2 ACL Cache -


is there example or better documentation how cache acl queries in symfony2.

i found following:

http://api.symfony.com/2.0/symfony/component/security/acl/domain/doctrineaclcache.html

but not know how apply on checks.

i've managed cache objectidentities. bit of not much.

after lot of digging around in security*.xml files i've made following modifications of config.yml:

  • i've added cache id (service id) acl configuration
  • i've enabled doctrine result cache.

config.yml:

doctrine:     orm:         result_cache_driver:             type: apc  security:     acl:         cache:             id:     security.acl.cache.doctrine             prefix: my_acl_prefix_ 

this enable caching of objectidentities, lot of other queries happening when symfony\component\security\acl\dbal\aclprovider::getancestorids() being called. method directly executes sql query, , uses no cache. in 2.2 , 2.3 there comment in method saying:

            // fixme: skip ancestors cached 

same stands couple of other methods in class in terms of not using result cache.

i guess implementing own aclprovider , injecting entity manager's result cache can cache these queries too.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -