Updated object is written to second level cache with CacheMode.IGNORE

Description

Doc says this:
CacheMode.IGNORE -> "The session will never interact with the cache, except to invalidate cache items when updates occur"

However, Hibernate actually write items to cache when updates occur.

I'm using CacheMode.IGNORE to avoid cache size increase for a certain case, but when update occurs, cache size increases.

To reproduce this issue, just open a session and call session.setCacheMode(CacheMode.IGNORE), then load and update an item. Attatched is the complete test code. In the test code, I investigate ehcache contents to make sure what data is cached, just to clarify the issue.

Environment

None

Assignee

Gail Badner

Reporter

Taro App

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure