{"action":"closed","issue":{"url":"https://api.github.com/repos/ehcache/ehcache3/issues/1066","repository_url":"https://api.github.com/repos/ehcache/ehcache3","labels_url":"https://api.github.com/repos/ehcache/ehcache3/issues/1066/labels{/name}","comments_url":"https://api.github.com/repos/ehcache/ehcache3/issues/1066/comments","events_url":"https://api.github.com/repos/ehcache/ehcache3/issues/1066/events","html_url":"https://github.com/ehcache/ehcache3/issues/1066","id":155877470,"number":1066,"title":"unable to reuse the cache file after a jvm quit","user":{"login":"shapowang","id":2981626,"avatar_url":"https://avatars.githubusercontent.com/u/2981626?v=3","gravatar_id":"","url":"https://api.github.com/users/shapowang","html_url":"https://github.com/shapowang","followers_url":"https://api.github.com/users/shapowang/followers","following_url":"https://api.github.com/users/shapowang/following{/other_user}","gists_url":"https://api.github.com/users/shapowang/gists{/gist_id}","starred_url":"https://api.github.com/users/shapowang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapowang/subscriptions","organizations_url":"https://api.github.com/users/shapowang/orgs","repos_url":"https://api.github.com/users/shapowang/repos","events_url":"https://api.github.com/users/shapowang/events{/privacy}","received_events_url":"https://api.github.com/users/shapowang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-05-20T02:56:19Z","updated_at":"2016-06-24T18:21:11Z","closed_at":"2016-06-24T18:21:11Z","body":"I'm try to use ehcache3 as a small database to persistent my serialisable java objects\r\n\r\n1    private static CacheManager cacheManager = CacheManagerBuilder.newCacheManagerBuilder()\r\n            .with(CacheManagerBuilder.persistence(\"ehcache_db\"))\r\n            .withCache(\"proxyCache\", CacheConfigurationBuilder.newCacheConfigurationBuilder(String.class, AvailableProxy.class, ResourcePoolsBuilder.newResourcePoolsBuilder().disk(100, MemoryUnit.MB, true)))\r\n            .build(true);\r\n2.put some cache into \"proxyCache\",wait until the ehcache3 persistent thread die and the application quit\r\n3.restart the application ,try read old cache info from \"proxyCache\",but it's new and empty.\r\n\r\nlogs as below:\r\nConnected to the target VM, address: '127.0.0.1:51118', transport: 'socket'\r\n10:39:12.376 [main] DEBUG org.ehcache.impl.persistence.DefaultLocalPersistenceService - RootDirectory Locked\r\n10:39:12.387 [main] INFO org.ehcache.core.internal.service.ServiceLocator - All Services successfully started.\r\n10:39:12.388 [main] INFO org.ehcache.core.EhcacheManager - Cache 'proxyCache' is getting created in EhcacheManager.\r\n10:39:12.407 [main] INFO org.ehcache.impl.persistence.DefaultLocalPersistenceService - Reusing /Volumes/sdk/bottle/pluginsPro/ehcache_db/proxyCache_51da15dcfb3bca73d696eb0ab11109a8e4f18e25\r\n10:39:12.411 [main] INFO org.ehcache.impl.persistence.DefaultLocalPersistenceService - Reusing /Volumes/sdk/bottle/pluginsPro/ehcache_db/proxyCache_51da15dcfb3bca73d696eb0ab11109a8e4f18e25/DefaultSerializationProvider-Key\r\n10:39:12.411 [main] INFO org.ehcache.impl.internal.spi.serialization.DefaultSerializationProvider - Serializer for <java.lang.String> : org.ehcache.impl.serialization.StringSerializer@69a10787\r\n10:39:12.414 [main] INFO org.ehcache.impl.persistence.DefaultLocalPersistenceService - Reusing /Volumes/sdk/bottle/pluginsPro/ehcache_db/proxyCache_51da15dcfb3bca73d696eb0ab11109a8e4f18e25/DefaultSerializationProvider-Value\r\n10:39:12.439 [main] INFO org.ehcache.impl.internal.spi.serialization.DefaultSerializationProvider - Serializer for <com.proxy.AvailableProxy> : org.ehcache.impl.serialization.CompactPersistentJavaSerializer@4f9a3314\r\n10:39:12.447 [main] INFO org.ehcache.impl.persistence.DefaultLocalPersistenceService - Reusing /Volumes/sdk/bottle/pluginsPro/ehcache_db/proxyCache_51da15dcfb3bca73d696eb0ab11109a8e4f18e25/offheap-disk-store\r\n10:39:12.558 [main] WARN org.ehcache.impl.internal.store.disk.OffHeapDiskStore - The index for data file ehcache-disk-store.data is out of date by 2896037ms, probably due to an unclean shutdown. Creating a new empty store.\r\n10:39:12.640 [main] INFO class org.ehcache.core.Ehcache-proxyCache - Initialize successful.\r\n10:39:12.641 [main] INFO org.ehcache.core.EhcacheManager - Cache 'proxyCache' created in EhcacheManager.\r\n10:39:12.641 [main] INFO org.ehcache.core.EhcacheManager - Initialize successful.\r\n\r\nstackoverflow has the same questions of ehcache2.x:\r\nhttp://stackoverflow.com/questions/1729605/ehcache-persist-to-disk-issues\r\nmost answers point out I should use \"CacheManager.getInstance().shutdown();\" \r\n\r\nBut after explore the source code of ehcache3 CacheManager and it's sub interfaces and sub classes,I can't find the shutdown method.\r\n\r\nwhat should I do?"}}
{"actor":{"display_login":"ljacomet"}}