PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, March 5, 2022

[FIXED] How to properly enable second level cache in Orocommerce

 March 05, 2022     orocommerce, symfony     No comments   

Issue

I wrote the following configuration in config.yml, but I'm not sure if this is the right thing to do:

doctrine:
orm:
    entity_managers:
        default:
            metadata_cache_driver:
                type: service
                id:   doctrine.metadata.cache
            query_cache_driver:
                type: service
                id: doctrine.query.cache
            second_level_cache:
                region_cache_driver:
                    type: service
                    id: snc_second_level_cache
                enabled: true
                region_lifetime: 600
            result_cache_driver:
                type: service
                id: doctrine.result.cache

service configuration:

    snc_second_level_cache:
        class: '%snc_redis.doctrine_cache_predis.class%'
        arguments:
            - '@snc_redis.doctrine'

Solution

The Oro team has investigated this feature, and for now, we found that it brings more issues than benefits, so the application doesn't support it out of the box, and enabling it just with the configuration does not affect anything.

However, if you want to enable it for some custom entities, the configuration seems correct. Just pay attention that there are multiple entity managers in ORO, not only the default one.



Answered By - Andrey Yatsenko
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing