Announcement

Collapse
No announcement yet.

Disabling cache for single user (me) ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disabling cache for single user (me) ?

    I often test changes while cache is enabled (to make espo faster for other users). I would like to bypass cache in order to not have to clean local storage / cache every time I change something.
    I was thinking maybe I could override the metadata that is sent to the client but I'm not sure what classes need to be overridden...

  • #2
    Hello tothewine, i think i have see on github Yuri add a config variable where for developper cache is disable..
    sorry can't find it (or maybe i dreams :s )

    Regards

    Comment


    • #3
      Thanks. I also remember that flag but I think it serves some other purpose... better check it again, tho

      Comment


      • #4
        Hello,
        As far as I know, you can't disable cache only for one user. So you need either disable cache for the entire system or clear cache via Administration -> Clear Cache or CLI each time you want to test changes.

        > i think i have see on github Yuri add a config variable where for developper cache is disable. sorry can't find it (or maybe i dreams :s )

        item, probably you are talking about this parameter: 'useCacheInDeveloperMode' => true`,? (see https://docs.espocrm.com/development...or-development).
        I don't think it is available for the 'product' (not development) instance and can help to reach the desired purpose.

        Comment


        • #5
          Indeed. I believe this question boils down to "how can I modify front-end settings before they are sent to the client?"...

          The affected urls to customize would be:
          • /
          • /api/v1/Settings
          • /api/v1/App/user
          • /api/v1/Metadata
          I'm not sure why the "useCache" is sent this many times...

          Comment


          • tothewine
            tothewine commented
            Editing a comment
            I figured the controller for App/user and cache is still there. Now it's the time for metadata. I wonder if it's easier to override the code that reads the config.php file...

        • #6
          Are you hosting it on a Developer server where only you be using it? Would disable write feature on the cache folder work? Or will send EspoCRM into crash mode.

          Comment


          • #7
            Actually this is on a live test instance used by multiple people, so I want to keep the benefit of cache for the regular users but change all the cache setting info the server sends to the browser in order to disable the cache from client side only for me, since it makes testing client side customizations easier (a simple refresh being enough).

            Comment


            • #8
              I can't figure how to customize \Espo\Core\Utils\ClientManager

              Maybe there is a way to spoof the config.php value of useCache instead ? Any pointers?

              Comment

              Working...
              X