Giter Club home page Giter Club logo

Comments (5)

rdegges avatar rdegges commented on July 4, 2024

Hey @Solido, that's a good question.

Right now our underlying Node SDK requires some form of cache, which is an in-memory cache by default. This is done this way as our implementation puts all requests through a cache manager.

What you can do to 'workaround' this for now, is do something like this:

app.use(stormpath.init(app, {
  cacheTTL: 1,
  cacheTTI: 1,
}));

This will use the default in-memory cache, but will set the expirey times to 1 second (so it will expire quickly).

Hope that helps.

from express-stormpath.

lhazlewood avatar lhazlewood commented on July 4, 2024

@rdegges the Java SDK provides a DisabledCacheManager implementation that always returns null for cache lookups. This is an implementation of the Null Object design pattern: the CacheManager does not need to be null (checks for null on the CM do not need to be made, reducing cyclomatic complexity), but it is effectively disabled. The Node and Python SDKs should have the same concept to allow users to disable the cache entirely.

I guess you can move this issue to the SDK project instead of the Express one?

from express-stormpath.

Solido avatar Solido commented on July 4, 2024

Based on previous indications, my deduction was that I can use customData as a cold data storage like configuration but not as a live storage.

If I modified data from my web UI and/or from StormPath admin or others webservice connected to stormpath I loose the integrity of data. I understand this is out of scope of current implementation but I was expecting this from Stormpath to save me lot of lines of code.

To be even more clear about the point I only care about Custom Data, only them should be live.

Hope this explanation help to built an even more complete product !

from express-stormpath.

rdegges avatar rdegges commented on July 4, 2024

@lhazlewood indeed. I was actually going to talk with @robertjd about this when we're in office together on this =) But yes, we'll get this into the Node SDK so it gets bubbled up to this library.

@Solido this is a really great use case, btw. We should definitely support this (and will!).

In general, our approach with caching is to try to avoid as many API requests to our service as possible (this way, your app is faster and doesn't need to make as many HTTP calls).

By default, our libraries cache stuff for 5 minutes, which means if you get burst traffic / etc., your app will respond with whatever account / customData / whatever stuff was requested very quickly, despite ISP issues / etc.

Anyhow: thanks for the issue / feedback. This stuff is really useful to us here and helps make our software better =)

from express-stormpath.

robertjd avatar robertjd commented on July 4, 2024

Caching can be disabled through the Node SDK. We now pass config options through this library down to the Node SDK.

from express-stormpath.

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.