Change record status: 
Project: 
Introduced in branch: 
11.4.x
Introduced in version: 
11.4.0
Description: 

A new cache.file_parsing cache bin has been added, for persistent caching of the result of file parsing. This bin does not have the cache.bin service tag so that it persists across cache clears (whether via drush, the UI or programmatic calls to drupal_flush_all_caches(). However the bin can be manually cleared if necessary using the CacheBackendInterface::deleteAll().

The bin is designed to be used with implementations of the new Drupal\Core\Utility\FileParsingCacheCollectorBase which supports validation of individual file entries via mtime checks.

This can be used as a replacement of the existing FileCache system which implements similar logic but with APCu as a storage backend. By using a persistent cache instead of APCu, the cache state will always be consistent across cli and between multiple web servers, which should improve response times both for local development which often involves frequent cache clears via the cli, and on production sites immediately after a full cache clear such as via deployments.

There is also a YamlCacheCollector class, which is used for asset library parsing (libraries.yml) and route parsing (routing.yml).

More implementations may be added to core in further issues.

Impacts: 
Module developers
Site templates, recipes and distribution developers