Skip to content

Commit

Permalink
Closing memcached connections when SessionFactory.close is invoked (#21)
Browse files Browse the repository at this point in the history
* Shutting down spymemcached connections on hibernate-core calls to
releaseFromUsafe

* Bumping library version

Co-authored-by: Andres Escobar <[email protected]>
  • Loading branch information
andrescmasmas and Andres Escobar authored Aug 31, 2021
1 parent c90cd12 commit dc2ad3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.github.mihaicostin</groupId>
<artifactId>hibernate-l2-memcached</artifactId>
<version>5.4.2.0</version>
<version>5.4.2.1</version>
<name>hibernate-l2-memcached</name>
<description>A library for using Memcached as a second level distributed cache in Hibernate.</description>
<url>https://github.com/mihaicostin/hibernate-l2-memcached</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public MemcachedCache getCache(String regionName) {

public void releaseFromUse() {
caches.clear();
if (client != null) {
client.shutdown();
}
}

public void addCache(String regionName) {
Expand Down

0 comments on commit dc2ad3c

Please sign in to comment.