Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #874 from cwardgar/variable-caches
Browse files Browse the repository at this point in the history
Allow default cache sizes of Variables to be modified by user.
  • Loading branch information
lesserwhirls authored Jul 10, 2017
2 parents 9043264 + a88db4a commit f840a1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cdm/src/main/java/ucar/nc2/Variable.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public class Variable extends CDMNode implements VariableIF, ProxyReader, Attrib
*/
static public boolean permitCaching = true;

static public final int defaultSizeToCache = 4000; // bytes cache any variable whose size() < defaultSizeToCache
static public final int defaultCoordsSizeToCache = 40 * 1000; // bytes cache coordinate variable whose size() < defaultSizeToCache
static public int defaultSizeToCache = 4000; // bytes cache any variable whose size() < defaultSizeToCache
static public int defaultCoordsSizeToCache = 40 * 1000; // bytes cache coordinate variable whose size() < defaultSizeToCache

static protected boolean debugCaching = false;
static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Variable.class);
Expand Down
4 changes: 2 additions & 2 deletions cdm/src/main/java/ucar/nc2/dataset/CoordinateAxis.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

public class CoordinateAxis extends VariableDS {
static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(CoordinateAxis.class);
static private final int axisSizeToCache = 100 * 1000; // bytes
static public int axisSizeToCache = 100 * 1000; // bytes

protected NetcdfDataset ncd; // container dataset
protected AxisType axisType = null;
Expand Down Expand Up @@ -421,4 +421,4 @@ public boolean isCoordinateVariable() {
return true;
}

}
}

0 comments on commit f840a1e

Please sign in to comment.