DDL cache should be tagged
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
I believe cache tag DB_PDO_MYSQL_DDL (constant Varien_Db_Adapter_Pdo_Mysql::DDL_CACHE_TAG) is used.
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 , 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?
Not frequently, but it has been needed before. For consistency it seems every category of tags should be associated with a cache type.
Confirming that this issue exists and is encountered regularly.
@colinmollenhour , we have placed the ticket to the product backlog and will notify you once we have it resolved.
@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.
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.
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.
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.
Thanks for reconsidering.
You are welcome! :-)
We have implemented this fix and it is on the way to next weekly release.
@colinmollenhour thank you for reporting the issue. It has already been resolved and available in the 0.1.0-alpha108+ release.