Giter Site home page Giter Site logo

How to disable cache? about slim-api-skeleton HOT 6 CLOSED

tuupola avatar tuupola commented on August 22, 2024
How to disable cache?

from slim-api-skeleton.

Comments (6)

tuupola avatar tuupola commented on August 22, 2024

Which cache are you referring to?

from slim-api-skeleton.

ganesh35 avatar ganesh35 commented on August 22, 2024

By that question, I am not sure on which cache.
I am using Angular2 on client side.
When I create (POST)/ update (PATCH & PUT) a todo record, it is not showing on the list (GET) page.
I had to clear the cache and re-login and re-list the page to see the new results.

Could not pin-point where the problem is. :(

I tried changing cache setting in file config/middleware.php but no success
File: config/middleware.php

...
$container["Cors"] = function ($container) {
...
        "cache" => 60,
...   
};

from slim-api-skeleton.

tuupola avatar tuupola commented on August 22, 2024

I would search Angular docs for information how and why it caches the results. Cors middleware cache setting affects only how long the OPTIONS preflight request is cached.

from slim-api-skeleton.

ganesh35 avatar ganesh35 commented on August 22, 2024

Thank you. I was using golang before slim with the same Angular code. It worked fine. I am searching other settings from LAMP stock.

from slim-api-skeleton.

ganesh35 avatar ganesh35 commented on August 22, 2024

I have been using my own custom CORS code which is causing the problem. I revoked to original Cors and everything working fine.

Thank you for your time and support.

from slim-api-skeleton.

tuupola avatar tuupola commented on August 22, 2024

Glad you found a solution!

from slim-api-skeleton.

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.