title: How I can disable the second-level cache of some certain entities in Hibernate without changing annotations
body: <p>I'm using Hibernate second level cache in my application, for certain business reason <strong>I can't change the entity annotation any more</strong>.</p>
  
  <p>In my project, apart from changing the Database from Hibernate, there exist also other native SQL that do not go through Hibernate. Therefore, the Hibernate second-level cache data could be stale after database being updated from native SQL. That's why I want <strong>to disable the second-level cache for certain entities (programmatically or other way than changing annotation).</strong></p>
  
  <p>Thanks in advance!</p>