Why this happens?
Drupal backend caches(render cache, dynamic_page_cache, page
) by default stores the cache in backend using the backend classes respectively. These backends can be in memory, APCU, or PHP or any custom backend like the below-mentioned.
- Cache.backend.memory
- Cache.backend.apcu
- Cache.backend.php
When you put this configuration in settings.php file -
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
$settings['cache']['bins']['page'] = 'cache.backend.null';
You have defined which backend cache bin each of the above definitions should hit to store and retrieve of the cache data. And in Drupal 8 you also need to define the class for the cache backend in development.services.yml file just to define the backend class for the services.
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
The NullBackendFactory does not store the data anywhere and you do not need to perform cache rebuild every time. NullBackendFactor invokes the NullBackend which stub the cache implementation.