Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
Icy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Metrics
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Bioimage Analysis
Icy
Commits
6533e0a2
Commit
6533e0a2
authored
Dec 21, 2020
by
Stéphane DALLONGEVILLE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix on cache initialization
parent
a2790c71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/main/java/icy/image/cache/EHCache2.java
src/main/java/icy/image/cache/EHCache2.java
+2
-2
No files found.
src/main/java/icy/image/cache/EHCache2.java
View file @
6533e0a2
...
...
@@ -145,8 +145,8 @@ public class EHCache2 extends AbstractCache
// c.setClass(path);
final
long
freeBytes
=
new
File
(
FileUtil
.
getDrive
(
path
)).
getUsableSpace
();
// subtract 200 MB to available space for safety
final
long
freeMB
=
(
freeBytes
<=
0
)
?
Long
.
MAX_VALUE
:
Math
.
max
(
0
,
(
freeBytes
/
(
1024
*
1024
))
-
200
);
// subtract 200 MB to available space for safety
, use 64 MB at min (well, not realy usefull then)
final
long
freeMB
=
(
freeBytes
<=
0
)
?
Long
.
MAX_VALUE
:
Math
.
max
(
64
,
(
freeBytes
/
(
1024
*
1024
))
-
200
);
// Stephane: we need to put a long idle / live time otherwise not eternal data
// will be removed from cache as soon it expired on get(key) call even if the cache is not full...
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment