magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

DDL cache should be tagged

Open colinmollenhour opened this issue 13 years ago • 14 comments

I believe the last time I checked the DDLs generated by the Zend_Db library is cached but not tagged with any Magneto-specific tags. There should be a separate cache type for the DDLs so they can easily be cleared without nuking the entire cache.

colinmollenhour avatar Dec 18 '12 05:12 colinmollenhour

@colinmollenhour I believe cache tag DB_PDO_MYSQL_DDL (constant Varien_Db_Adapter_Pdo_Mysql::DDL_CACHE_TAG) is used.

sshymko avatar Dec 18 '12 16:12 sshymko

To clarify, the entries need to be tagged and the tag used needs to be associated with a cache type so that it can be cleared using Cache Management or other method which uses cache types (a.k.a. "groups"). For example, the "block_html" is a cache type (BLOCK_HTML is a tag as well).

colinmollenhour avatar Dec 18 '12 17:12 colinmollenhour

@colinmollenhour , sorry for the delay with the response. Why do you think we need to have the possibility to flush DDLs separately from all cache? Do you frequently perform modifications in the data structure to flush DDLs?

verklov avatar Jan 03 '14 14:01 verklov

Not frequently, but it has been needed before. For consistency it seems every category of tags should be associated with a cache type.

colinmollenhour avatar Jan 03 '14 14:01 colinmollenhour

Confirming that this issue exists and is encountered regularly.

benmarks avatar Jan 04 '14 17:01 benmarks

@colinmollenhour , we have placed the ticket to the product backlog and will notify you once we have it resolved.

verklov avatar Feb 14 '14 15:02 verklov

@colinmollenhour, unfortunately we will not provide the ability to clear DDL cache. After the investigation the team had we found out that implementing this ability faces circular dependency - to define if DDL is enabled, a request to database should be done, which requires knowledge about if DDL cache is enabled. Anyway, thank you for the idea! Please continue contributing to improving the Magento 2 product.

verklov avatar Apr 16 '14 15:04 verklov

The circular dependency only matters if you want to disable it. I agree that it doesn't make sense to disable the DDL cache for the reason you stated, but it is still very useful to be able to clear it via the Cache Management page.

colinmollenhour avatar Apr 16 '14 22:04 colinmollenhour

Let me continue to discuss this with the team and architects. I see this as a requested feature by many community members. Let's see if we can come to the agreement. I will keep you informed.

verklov avatar Apr 17 '14 10:04 verklov

Reopening this issue to implement DDL as a separate entry in Cache Management with the ability to flush it independently. At this time we will only be working on the implementation when DDL cache will always be enabled.

verklov avatar Apr 17 '14 15:04 verklov

Thanks for reconsidering.

colinmollenhour avatar Apr 17 '14 15:04 colinmollenhour

You are welcome! :-)

verklov avatar Apr 17 '14 16:04 verklov

We have implemented this fix and it is on the way to next weekly release.

antonmakarenko avatar Dec 12 '14 15:12 antonmakarenko

@colinmollenhour thank you for reporting the issue. It has already been resolved and available in the 0.1.0-alpha108+ release.

tanya-soroka avatar Dec 19 '14 20:12 tanya-soroka