Code Monkey home page Code Monkey logo

Comments (5)

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

Hi Krishna,

I looked over the code from hazelcast and also didn't see the cache TTL exposed - can you give me an example on how they do that? As far as I know, the spring cache API doesn't expose the TTL explicitly but I would really like to support that.

Let me know and we'll make that happen

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

What we could do easily is to expose it on the CacheManager, since you can configure that directly. What will be harder is to do it on a per-key basis, maybe we can do that with a annotation on the method, but this needs more thought.

What is your use case here? instance wide TTL or on a per-key basis?

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

I'm afraid this can't be done easily with the current implementation. The spring docs state explicitly that its not the focus of this API..

If you need it please use the CouchbaseClient API directly. For related needs, the @CacheEvict annotation can help!

Also see http://docs.spring.io/spring/docs/3.2.4.RELEASE/spring-framework-reference/html/cache.html#cache-specific-config

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Konrad Krรณl commented

Hey, I think it doesn't make sense to provide cache abstraction where you can't say how long you want to cache objects. That's why I did my fork and pull request that covers functionality requested in this bug. Please take a look here:
#36

from spring-data-couchbase.

spring-projects-issues avatar spring-projects-issues commented on May 8, 2024

Michael Nitschinger commented

I've merged your changes Konrad, thanks much!

Btw, we are working on a Jcache adapter for the 2.0 sdk, so this one can in the future also be used with spring

from spring-data-couchbase.

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.