Review main Abandoned

26575[TASK] Protect some important caches from being cleared

Claus Due CR 0 V 0 Easy +20 −0 updated 03/23/14, 22:54

Commit message

This change protects key core caches (phpcode, fluidtemplate, class
manifests, Extbase reflection and similar) from being cleared by
the "clear all caches" when the site is set to Production context.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 18

  1. Wouter Wolters commented on patch set 1 12/28/13, 17:02

    Releases: 6.2 missing

    CacheManager.php:165

    debug calls still here:)
  2. Claus Due uploaded patch set 2 12/28/13, 17:03

  3. Mr. Jenkins commented on patch set 1 12/28/13, 17:11

  4. Mr. Jenkins commented on patch set 2 12/28/13, 17:15

  5. Claus Due commented on patch set 2 12/28/13, 17:21

    Completely subjective speed measurements, before to after, site set to "Production" context: Clear all caches: ~900ms to ~250ms Warmup after cache clear: 1.4s to 1.1s Frontend page with warmed cache: 2.5s to 2.0s
  6. Wouter Wolters voted on patch set 2 CR +1 12/28/13, 18:56

  7. mostwanted commented on patch set 2 12/28/13, 20:50

    CacheManager.php:26

    Is this necessary/useful here?
  8. Markus Klein commented on patch set 2 CR -1 12/28/13, 20:57

    Releases line missing!

    CacheManager.php:164

    There's API for retrieving the context. GeneralUtility::getApplicationContext()->isProduction()
  9. Claus Due uploaded patch set 3 12/28/13, 21:16

  10. Claus Due uploaded patch set 4 12/28/13, 21:17

  11. Mr. Jenkins commented on patch set 3 12/28/13, 21:30

  12. Mr. Jenkins commented on patch set 4 12/28/13, 21:31

  13. Helmut Hummel commented on patch set 4 CR -1 12/29/13, 09:55

    I totally agree that we need such a thing. However I think we should talk about possible solutions beforehand, because I think that simply binding this behavior to the application context has several drawbacks. Would be great if you could start a thread on the core list, because I think several people already thought about a solution in this area and maybe we come up with a sweet solution for that.
  14. Claus Due commented on patch set 4 12/29/13, 10:09

    > However I think we should talk about possible solutions beforehand, because I think that simply binding this behavior to the application context has several drawbacks. You should tell me which drawbacks you think this has instead of just saying you think it has some. Maybe even an alternative suggestion? > Would be great if you could start a thread on the core list, because I think several people already thought about a solution in this area and maybe we come up with a sweet solution for that. I respectfully decline; I do not have enough time to polish this solution to a perfect design-by-committee. It works and works well, it solves the problem. But if you tell me which drawbacks you think it has re: context, and if those worries make sense, I will be the first person to change the patch ;)
  15. mostwanted commented on patch set 4 12/29/13, 17:42

    CacheManager.php:163

    Markus mentioned that there is an API which could be used: --- quote --- There's API for retrieving the context. GeneralUtility::getApplicationContext()->isProduction() --- /quote --- Would it make sense here if you used it?
  16. Helmut Hummel commented on patch set 4 CR -2 01/15/14, 19:20

    Please review the (more flexible) approach here: https://review.typo3.org/26829 It solves the same thing but having more option to change the configuration for different environments. If you agree on that, you can abandon this change. Thanks!
  17. Wouter Wolters commented on patch set 4 01/18/14, 13:11

    Claus: This is now handled with the group caches. Is this now obsolete?
  18. Claus Due abandoned the change 03/23/14, 22:54

    No longer required after splitting the system-type caches from the general-type ones. Awesome work guys!