Skip to content

Commit

Permalink
HHH-10782 Add a comment about what clearing the query plan cache means
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Aug 9, 2018
1 parent 0b17fc3 commit ad4978c
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -220,7 +220,13 @@ public NativeSQLQueryPlan getNativeSQLQueryPlan(final NativeSQLQuerySpecificatio
}

/**
* clean up QueryPlanCache when SessionFactory is closed
* Clean up the caches when the SessionFactory is closed.
* <p>
* Note that depending on the cache strategy implementation chosen, clearing the cache might not reclaim all the
* memory.
* <p>
* Typically, when using LIRS, clearing the cache only invalidates the entries but the outdated entries are kept in
* memory until they are replaced by others. It is not considered a memory leak as the cache is bounded.
*/
public void cleanup() {
LOG.trace( "Cleaning QueryPlan Cache" );
Expand Down

0 comments on commit ad4978c

Please sign in to comment.