Questions tagged [nhibernate-caches]

22 questions
7
votes
1 answer

How do I use Hibernate's second level cache with JPA?

I am implementing an Entity Attribute Value based persistence mechanism. All DB access is done via Hibernate. I have a table that contains paths for nodes, it is extremely simple, just an id, and a path (string) The paths would be small in number,…
mahonya
  • 9,247
  • 7
  • 39
  • 68
6
votes
2 answers

NHibernate second-level caching - evicting regions

We have a number of cache regions set up in our nHibernate implementation. In order to avoid trouble with load balanced web servers, I want to effectively disable the caching on the pages that edit the cached data. I can write a method that clears…
Ted
  • 113
  • 5
6
votes
1 answer

Index was outside the bounds of the array - NHibernate 3.2

I've been trying to upgrade a project using fluent nhibernate 1.2 and NHibernate 3.1 to FNH 1.3 and NH 3.2, and it all seems to work except now Im getting an exception on a .List() command. The exception type & message…
electricsheep
  • 5,114
  • 9
  • 37
  • 41
5
votes
1 answer

Where can I download nhibernate.caches.syscache 3.1

I've been looking over the internet and can't seem to find where I can download v3.1 of nhibernate.caches.syscache that works with NHibernate 3.1.0.4000. I have version 3.0.0.4000 of the syscache, but is there a newer version?
Chris Conway
  • 16,269
  • 23
  • 96
  • 113
4
votes
1 answer

fluent nhibernate first level cache not working as expected

I have a function which gets called many times in one session. To my understanding with NHibernate first level cache, exact query in the same session will execute only once irrespective of the number of calls. Such is not the case though. Below is…
4
votes
1 answer

How to make NHibernate considered property to always be dirty when using dynamic update or insert?

I am looking for help on an issue with NHibernate which has been bugging me for a while now. Long story short: I’m looking for a way to, in the first level cache, “reset” a property on an entity each time I do an update or an insert. What I want to…
dnyvik
  • 43
  • 4
3
votes
2 answers

How to configure NHibernate's Second Level Cache in NHibernate >= 3.2?

Before upgrading to NHibernate 3.2, I used the following code for Fluent NHibernate: OracleClientConfiguration configurer = (OracleClientConfiguration.Oracle10.ShowSql().ConnectionString(c => …
rebelliard
  • 9,592
  • 6
  • 47
  • 80
3
votes
2 answers

NHibernate won't let me insert a model in a session if it was part of a failed transaction on that session

Why can't I just insert the model after I get an error back from the database when trying to insert it the first time: Report report = null; using (var session = SessionFactory.OpenSession()) { try { using (var transaction =…
enamrik
  • 2,292
  • 2
  • 27
  • 42
2
votes
0 answers

NHibernate Cache PrevalenceProvider strange behavior

I'm using NH Prevalence Cache provider with happiness from years, but recently, my team, started to fall in some data incorrectness which I can't yet explain... We setup the prevalence by setting up the cache provider and setting the…
Hoghweed
  • 1,938
  • 1
  • 16
  • 35
2
votes
0 answers

NHibernate QueryCache in Multiuser-Environment

For our web-application (ASP.NET) we're using Fluent NHibernate (2.1.2) with 2nd-Level caching not only for entities, but also for queries (generating queries with the criteria API). We're using the Session-Per-Request pattern and one SessionFactory…
2
votes
2 answers

Nhibernate 2nd level Cache with AliasesToBean transformer

I have an entity: public class SalesUnit { public virtual long Id { get; set; } public virtual string Name { get; set; } } And related Dto: public class SalesUnitDto { public long Id { get; set; } public string Name { get; set;…
Roman Koliada
  • 4,286
  • 2
  • 30
  • 59
2
votes
1 answer

NHibernate MemCached w/ Protobuf-net.Enyim -- does it actually work?

I've used the following assemblies to hook up NHibernate 2nd-level caching with Enyim Memcached using Protobuf-net binary serializer: NHibernate NHibernate.Caches.EnyimMemcached Enyim.Caching protobuf-net protobuf-net.Enyim It's recently come to…
2
votes
1 answer

Session factory issue in setting up hibernate distributed ehcache with terracotta

I am trying to setup EHCache in distributed environment with Terracotta. Here I am able to connect Application server and Terracotta server and in terracotta Developer Console I am able to see replicated objects. But in application server…
Bookie
  • 93
  • 1
  • 6
1
vote
1 answer

Nhibernate Clear Cache for a Specific Region

I am trying to manually clear the level 2 cache for a specific region. I found the method posted in answer to this question. While this is working to clear my entities, for some reason the querycache is not getting cleared. This results in a…
metsman
  • 57
  • 4
1
vote
2 answers

NHibernate SecondLevel Cache Performance

While researching the possibilities that the second level cache in nhibernate provides I tested some implementations. Currently the outcome is quite unexpected and I'am questioning if my expectations are wrong. Scenario (Read-Heavy) At first 4 *…
hessenmob82
  • 175
  • 12
1
2