Git Product home page Git Product logo

Comments (4)

noxify avatar noxify commented on August 19, 2024 2

Hi,

it seems that this feature is currently not implemented.

I assume you mean something like forgetAll() or something like that.

Idea / Workaround:

  1. get all models ( code snippet: http://stackoverflow.com/a/34054171 )
  2. Initialize an empty model for each found model
  3. Run the forgetCache() method for each initalized model

from laravel-cacheable.

noxify avatar noxify commented on August 19, 2024 1

I hope i understood it correctly.

You have a model where the cacheable package is used.

You have a static variable where you can exclude a function from the cache:

protected $ignoreCache = ['created', 'updated'];

Is this correct?

Maybe, it's better to create a new issue / feature request for this.
If you have any ideas how to implement this, feel free to send a PR :)

from laravel-cacheable.

Krato avatar Krato commented on August 19, 2024

Ok. I will try.

Also, will be great to set if you want to use cache or not for some functions, and when ends, recache.

Thanks!

from laravel-cacheable.

Omranic avatar Omranic commented on August 19, 2024

@Krato For the first question about forgetting all models cache, I don't see a real need to implement it by default since you still can do it as @noxify mentioned, and it's actually up to your app's logic which differs from one scenario to another 🙂

And for the other feature request about ignoring some methods, that's a good idea. I'll be happy to accept your PR, or you can open a new issue with your feature proposal 👍

from laravel-cacheable.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.