Question

I noticed that Spring reference application (Sagan) uses the SimpleCacheManager implementation. See here for source code of Sagan.

I was surprised by this choice because I thought that all but small applications running on a single node would use something like a Redis cache manager and not the simple cache manager.

How can a large application like Sagan -which I assume runs on cloudfoundry- use this simple implementation?

Any comment welcome.

Was it helpful?

Solution

Well, the SimpleCacheManager choice has been made because it was the simplest solution that could possibly work. Note that Sagan is, at least for now, not storing a lot of data in that cache and merely using it to respect various APIs rate-limiting and get better performance on some parts of the application.

Yes, Sagan is running on CloudFoundry (see this presentation) and is using CF marketplace services.

Even if cache consistency between instances is not a constraint for now, we could definitely add another marketplace service, here a Redis Cloud instance, and use this as a central cache repository.

Now that we're considering using that cache for more features, it even makes sense to at least consider that use case, since it could lower our monthly bill (pay a small fee for a redis service and use less memory for our CF instances).

In any case, thanks a lot balteo for this insightful question, we've created a Github issue for that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top