Why the Magento 2 “Collection Data” Cache is used not for all entities?Why Can't Magento Turn Off The...

Calculate the true diameter of stars from photographic plate

How to access internet and run apt-get through a middle server?

A Missing Symbol for This Logo

Eww, those bytes are gross

Existence of Riemann surface, holomorphic maps

Boss asked me to sign a resignation paper without a date on it along with my new contract

How do I prevent a homebrew Grappling Hook feature from trivializing Tomb of Annihilation?

Is a new boolean field better than null reference when a value can be meaningfully absent?

How can I play a serial killer in a party of good PCs?

How can 若い時 and ずっと work in this sentence?

After checking in online, how do I know whether I need to go show my passport at airport check-in?

Best way to strengthen a wheel?

Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?

Plausible reason for gold-digging ant

What language shall they sing in?

How would an AI self awareness kill switch work?

What is a good reason for every spaceship to carry a weapon on board?

Can we "borrow" our answers to populate our own websites?

Separate environment for personal and development use under macOS

Subsurf on a crown. How can I smooth some edges and keep others sharp?

What senses are available to a corpse subjected to a Speak with Dead spell?

Which RAF squadrons and aircraft types took part in the bombing of Berlin on the 25th of August 1940?

Can the "Friends" spell be used without making the target hostile?

Book where a space ship journeys to the center of the galaxy to find all the stars had gone supernova



Why the Magento 2 “Collection Data” Cache is used not for all entities?


Why Can't Magento Turn Off The Cache When Redis FailsMagento 2: What Determines if a Request is “Full Page Cacheable”Dealing with collections from my model in Magento 2Magento 2 : How to generate a collection from data modelsMagento 2 : Can a single UI Component node have more than one collection?Magento 2 : How to get top 10 repeated values in a column using CRUD instead of sql?Magento 2 Where (code) are the filters from the layered navigation applied to the product collection?Magento 2.2.4 - Modifying Cache configs via CLI or env.php not working when Opcache EnabledMagento 2 - Clear cache in 3 Servers programatically?how to get all the attributes and values for all product entities from product collection model













4















In my practice I've never really faced with situation that it was needed to clean the collection cache. It is strange)

I checked and detected that the magento uses the collection cache only for 4 entities:



website
store_group
store
category


These entities uses for their collections the virtual types based on



MagentoFrameworkDataCollectionDbFetchStrategyCache


which in turn uses MagentoFrameworkAppCacheTypeCollection for defining the cache type - collection.



You can find the all SQL-queries which used (after md5 tranformation) as cache keys - see the fetchAll method.



And these SQL-queries only to tables which related to entities listed above.



Why doesn't magento use the collection cache for other entities, such as products or CMS-pages?



When should we use the collection cache for own custom entities?










share|improve this question





























    4















    In my practice I've never really faced with situation that it was needed to clean the collection cache. It is strange)

    I checked and detected that the magento uses the collection cache only for 4 entities:



    website
    store_group
    store
    category


    These entities uses for their collections the virtual types based on



    MagentoFrameworkDataCollectionDbFetchStrategyCache


    which in turn uses MagentoFrameworkAppCacheTypeCollection for defining the cache type - collection.



    You can find the all SQL-queries which used (after md5 tranformation) as cache keys - see the fetchAll method.



    And these SQL-queries only to tables which related to entities listed above.



    Why doesn't magento use the collection cache for other entities, such as products or CMS-pages?



    When should we use the collection cache for own custom entities?










    share|improve this question



























      4












      4








      4


      1






      In my practice I've never really faced with situation that it was needed to clean the collection cache. It is strange)

      I checked and detected that the magento uses the collection cache only for 4 entities:



      website
      store_group
      store
      category


      These entities uses for their collections the virtual types based on



      MagentoFrameworkDataCollectionDbFetchStrategyCache


      which in turn uses MagentoFrameworkAppCacheTypeCollection for defining the cache type - collection.



      You can find the all SQL-queries which used (after md5 tranformation) as cache keys - see the fetchAll method.



      And these SQL-queries only to tables which related to entities listed above.



      Why doesn't magento use the collection cache for other entities, such as products or CMS-pages?



      When should we use the collection cache for own custom entities?










      share|improve this question
















      In my practice I've never really faced with situation that it was needed to clean the collection cache. It is strange)

      I checked and detected that the magento uses the collection cache only for 4 entities:



      website
      store_group
      store
      category


      These entities uses for their collections the virtual types based on



      MagentoFrameworkDataCollectionDbFetchStrategyCache


      which in turn uses MagentoFrameworkAppCacheTypeCollection for defining the cache type - collection.



      You can find the all SQL-queries which used (after md5 tranformation) as cache keys - see the fetchAll method.



      And these SQL-queries only to tables which related to entities listed above.



      Why doesn't magento use the collection cache for other entities, such as products or CMS-pages?



      When should we use the collection cache for own custom entities?







      magento2 cache






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 3 hours ago







      sergei.sss

















      asked 3 hours ago









      sergei.ssssergei.sss

      596412




      596412






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f263459%2fwhy-the-magento-2-collection-data-cache-is-used-not-for-all-entities%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f263459%2fwhy-the-magento-2-collection-data-cache-is-used-not-for-all-entities%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          夢乃愛華...