I am having a drupal 8 website where cache_render table is growing to GBs. I am not sure why this growing huge, any starting pointers would be helpful.
Thanks
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThere are some ongoing improvements to e.g. cache 404 pages only for a short time.
Make sure that cron is running, so that expired caches are deleted.
Also consider using an alternative cache backend like Redis or Memcache, both have a max size that the allocate and delete items that have not been used for a while.
Did you inspect the content of the table cache_render
? The page element that uses the most space will be obvious, because it has the most entries.
For example a block with a cache context on url.path
:
cid:
entity_view:block:block_name:[languages:language_interface]=??:[url.path]=/aaa/bbb/ccc:[user.permissions]=???
The cache contexts are in square brackets [].
In this example you would get a new entry in the cache table for every page with a different url you visit which has this block on it.
In this case you could think about changing this to [url.path.parent] like the breadcrumb block does, this would reduce the amount of data.
cache_render
table? If we don't know we can only speculate. – 4k4 May 20 '16 at 13:21