EHC ❯ Ehcache: diskstore : readable file names
-
Task
-
Status: New
-
2 Major
-
Resolution:
-
-
-
ljacomet
-
Reporter: omkreddy
-
February 17, 2014
-
0
-
Watchers: 5
-
March 15, 2014
-
Description
Hi,
we are using ehcache with configuration diskpersistent=”true” and eternal=”true”. We are seeing files in disk store path. But the file names are not readable.
%0046%0054%0050%004eame%0043ache.data %004eame%0054o%004cabel%0043ache.data
Is there any way to make these file names readable? With readable names, it is easy to delete a particular cache during restarts.
Regards Kumar
Comments
Louis Jacomet Jacomet 2014-03-14
Kumar Reddy 2014-03-14
some cache names are ALARM_CACHE MO_ALARM_ID_CACHE FLAP_CACHE SEVERITY_CACHE
and the file names are:
%0041%004c%0041%0052%004d_%0043%0041%0043%0048%0045.data %0046%004c%0041%0050_%0043%0041%0043%0048%0045.data %004d%004f_%0041%004c%0041%0052%004d_%0049%0044_%0043%0041%0043%0048%0045.data %0053%0045%0056%0045%0052%0049%0054%0059_%0043%0041%0043%0048%0045.data
Louis Jacomet Jacomet 2014-03-14
I asked for your cache names to check whether or not they would contain non ASCII characters. But that is not the case. The issue is your usage of capital letters.
We have to escape these because we do not know if the underlying filesystem will be case sensitive or not. And as having two caches named “CACHE” and “cache” is valid in Ehcache, we have to make sure these will end up in two different files.
So if you require easy file identification, you should use non capital letters and you will end up with a clear name for the file.
Kumar Reddy 2014-03-15
Thanks for the tip. Now i am getting clear file names. Thanks for the support.
Ehcache does some sanitizing on the cache name to make sure the file ends up having a name valid for the filesystem. Can you give your cache names?