Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-28816

console cache:clear doesn't remove cache from Redis

    Details

    • Sprint:
      [2.1] Sprint 4

      Description

      php app/console c:c --env=prod does not clear, nor expire the cache stored in redis

      Step to reproduce

      redis-cli> keys *
      ( pick whatever key listed and then get  the ttl )
      redis-cli> ttl 42ca5d202483cd568d53e6b689ca4e70
      (integer) 376937
       
      shell> php app/console c:c --env=prod
       
      redis-cli> ttl 42ca5d202483cd568d53e6b689ca4e70
      (integer) 376930
      

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment -

          I talked to André Rømcke, and this actualy might be correct behavior.

          c:c is a symfony command and should maybe just clear the config cache (like the container cache etc), not persistence cache or any other cache which stores content.
          If so, we should like have a different command ( or a parameter to c:c ) for clearing content related cache. That should likely be considered a feature request though

          Show
          Vidar Langseid added a comment - I talked to André Rømcke , and this actualy might be correct behavior. c:c is a symfony command and should maybe just clear the config cache (like the container cache etc), not persistence cache or any other cache which stores content. If so, we should like have a different command ( or a parameter to c:c ) for clearing content related cache. That should likely be considered a feature request though
          Hide
          Andrzej Longosz added a comment - - edited

          c:c is a symfony command and should maybe just clear the config cache

          I can confirm it wasn't meant for clearing persistence cache.

          RFC PR: https://github.com/ezsystems/ezpublish-kernel/pull/2267

          Show
          Andrzej Longosz added a comment - - edited c:c is a symfony command and should maybe just clear the config cache I can confirm it wasn't meant for clearing persistence cache. RFC PR: https://github.com/ezsystems/ezpublish-kernel/pull/2267
          Hide
          Andrzej Longosz added a comment -

          As concluded in the PR discussion this is not a bug and introducing that behavior to Symfony cache:clear command is not a good choice.

          Since the issue is LTS-only, what we can do is to improve the Doc stating that in case of Redis its cache has to be cleared using dedicated command line application: redis-cli flushall.
          I've created EZP-28903 for that.

          Of course for 2.x we could also prepare a dedicated command to clear all Content cache (HTTP cache + Persistence cache). It needs to be taken care as a new story for a Sprint.

          Show
          Andrzej Longosz added a comment - As concluded in the PR discussion this is not a bug and introducing that behavior to Symfony cache:clear command is not a good choice. Since the issue is LTS-only, what we can do is to improve the Doc stating that in case of Redis its cache has to be cleared using dedicated command line application: redis-cli flushall . I've created EZP-28903 for that. Of course for 2.x we could also prepare a dedicated command to clear all Content cache (HTTP cache + Persistence cache). It needs to be taken care as a new story for a Sprint.

            People

            • Assignee:
              Unassigned
              Reporter:
              Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 1 hour
                2d 1h

                  Agile