Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 807733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:26:57+00:00 2026-05-15T00:26:57+00:00

I am planning to implement a cache solution into an existing web app. Nothing

  • 0

I am planning to implement a cache solution into an existing web app. Nothing complicated: basically a concurrent map that supports overflowing to disk and automatic eviction. Clustering the cache could be requirement in the future, but not now.

I like ehcache’s copyOnRead and copyOnWrite features, because it means that I don’t have to manually clone things before modifying something I take out of the cache. Now I have started to look at Infinispan, but I have not found anything equivalent there. Does it exist?

I.e., the following unit tests should pass:

@Test
public void testCopyOnWrite() {
    Date date = new Date(0);
    cache.put(0, date);
    date.setTime(1000);
    date = cache.get(0);
    assertEquals(0, date.getTime());
}

@Test
public void testCopyOnRead() {
    Date date = new Date(0);
    cache.put(0, date);
    assertNotSame(cache.get(0), cache.get(0));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:26:58+00:00Added an answer on May 15, 2026 at 12:26 am

    According to a JBoss developer, Infinispan does not yet support such feature. You should log a request for enhancement in the Infinispan issue tracker, so that others may vote on it (I will).

    That being said, if you need this feature now, a workaround would be to extend AbstractDelegatingCache, and override the get and put methods to add this functionality. You could use your own copy strategy or look at how EHCache did it for inspiration.

    Also, you may consider the Infinispan forum if you have further questions, since you will have more views from the Infinispan community.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 498k
  • Answers 498k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Msmq transactions do not guarantee that the receiver has received… May 16, 2026 at 12:23 pm
  • Editorial Team
    Editorial Team added an answer Yes, an uninstall will leave your data in tact. You'd… May 16, 2026 at 12:23 pm
  • Editorial Team
    Editorial Team added an answer insted of using the constructor of simpleXML try using the… May 16, 2026 at 12:23 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am planning to implement logging into a web application that I am currently
I am planning to implement a small standalone program that will make a https
we are planning to implement sql server 2005 cluster in next few months. i
I'm planning to implement a list of Things in C++ where elements might be
I'm planning to implement my own set of constraints, and am having some difficulty
I am planning to implement a small-scale data acquisition system on an RTOS platform.
I am planning to use Silverlight control for bing map. It will be used
I have kind of Listing application for iPhone application, which always calling a web
I am planning to make a CMS using jsp and servlets. Could anyone tell
I have a CMS system that stores data across tables like this: Entries Table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.