On a project my firm is involved with we are using render cache to save on PHP memory overhead (works great btw). The problem is there doesn't seem to be any inbuilt mechanism in core to turn render caching off. This is very inconvenient for local development. I would also imagine that there might be other use cases where it would be nice to able to turn it off. It seems the only way to accomplish this currently is to wrap the addition of '#cache' to render arrays in a custom procedural helper. The patch I'm proposing adds a render_cache check in drupal render before sending the output of an array to cache_set/cache_get. The ideal solution would create a variable that could be set to FALSE but which defaults to TRUE in order to maintain backwards compatibility.

Comments

mrmikedewolf created an issue. See original summary.

mrmikedewolf’s picture

Issue summary: View changes
mrmikedewolf’s picture

mrmikedewolf’s picture

mrmikedewolf’s picture

Updated patch use #4.

mrmikedewolf’s picture

StatusFileSize
new1.24 KB

Fix patch name.

mrmikedewolf’s picture

mrmikedewolf’s picture

StatusFileSize
new1.2 KB
mrmikedewolf’s picture

Use #8. Feedback is much appreciated!

mrmikedewolf’s picture

Status: Active » Needs review
mrmikedewolf’s picture

Assigned: mrmikedewolf » Unassigned
avpaderno’s picture

Issue tags: -Render Cache, -drupal_render, -#cache

Version: 7.39 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

avpaderno’s picture

Title: Need way to disable render caching. » Allow to disable the render cache

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.