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

  • Home
  • SEARCH
  • 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 8519147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:10:09+00:00 2026-06-11T06:10:09+00:00

I use NHibernate with Memcached as a second level cache and have always been

  • 0

I use NHibernate with Memcached as a second level cache and have always been curious about the cache.use_minimal_puts configuration option.

According to the documentation:

hibernate.cache.use_minimal_puts: Optimizes second-level cache operation to minimize writes, at the cost
of more frequent reads. This setting is most useful for clustered
caches and, in Hibernate3, is enabled by default for clustered cache
implementations.

To be clear, I’m not running Memcached in a cluster environment, but it does run on a remote machine. Another factor to consider may be whether or not there is any major difference in speed between reading and writing to Memcached.

Would I benefit from enabling cache.use_minimal_puts in this scenario?

  • 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-06-11T06:10:10+00:00Added an answer on June 11, 2026 at 6:10 am

    I don’t have experience in NHibernate but have worked with Second level caches in Hibernate and I have been told that the same concepts are applicable to both.

    The basic idea behind providing the parameter hibernate.cache.use_
    minimal_puts
    is that before hibernate puts an object in cache it first check the second level cache whether the object is already present there, and if not then only put there.

    This would be helpful ONLY when the data reads from caches are very less expensive than data updates. This is what the docs means about the following

    …optimization of second-level cache operation to minimize writes, at
    the cost of more frequent reads.

    The case that fits perfectly for this kind of optimization is replication in clustering.

    If you are using clustering then the put operation is very expensive as it activates cache replication listeners in case of clustered caches. If you are not using clustering then this put operation is comparatively very cheap.

    Even in case of clustering there might be cache providers which rely on invalidation of entities instead of replicating the changes done to them. In that case too, this parameter would be useless.

    One factor that can hamper performance is the kind of replication synchronous or asynchronous) used by Memcache. I have not used MemCache but EhCache supports both models.

    So in your case as you are NOT using clustering and though the cache is on a remote process I seriously doubt that there would be any performance benefit by setting this parameter to true.

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

Sidebar

Related Questions

I've been following some examples about how to use NHibernate with SQLite, and most
I use NHibernate and have a custom type for encrypting passwords in the database
For our test fixtures we use NHibernate to generate a database schema. We have
I have a console command line app that use NHibernate . I am trying
I'm a little confused. We have developed an net 4.0 application. We use nhibernate
I have a C# WinForms application with a database backend (oracle) and use NHibernate
I have started to use NHibernate 3.0 and PostgreSQL for a small project, so
I use NHibernate 1 and have a HQL query SELECT mo FROM MyObject mo
In a upcoming project I'm going to use NHibernate with Oracle. I have used
Application use NHibernate. I Have object A that contains set of objects B. I

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.