Coder Social home page Coder Social logo

Comments (4)

sjbronner avatar sjbronner commented on June 21, 2024

Aren't all existing cache entries cleared at the end of setUp() by cache()->flush()?
Where is that defined, anyway?

from laravel-model-caching.

mikebronner avatar mikebronner commented on June 21, 2024

Ah yes, you're right. I forgot about that. So then why do you think we were getting false positives?

from laravel-model-caching.

sjbronner avatar sjbronner commented on June 21, 2024

Maybe it's not working. Can you tell me what code is run by that call?

from laravel-model-caching.

sjbronner avatar sjbronner commented on June 21, 2024

Looking at an example of a false positive result gave me further insight into the issue:
tests/Unit/CachedBuilderTest.php function testValueModelResultsCreatesCache was caching stuff under the specific key that was to be tested as well as additional keys as a side effect. One of those additional keys was then mistakenly used in the cache retrieval. The result was not the expected result. But as the result was a container containing the expected value, the first mistake was compounded by extracting the desired value from the returned container. Thus a successful comparison could be made. Test passed. Test was wrong.
In any case, the error was an error of the specific test, it was not systemic. It just so happened that this error was also present in another test. Both tests have previously been fixed. There is nothing to do here.

from laravel-model-caching.

Related Issues (20)

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.