private void addAllWaypointNeededVars(final Set<String> neededVars) {
        final Geocache cache = DataStore.loadCache(this.geocode, LoadFlags.LOAD_CACHE_OR_DB);
        if (cache != null) {
            for (Waypoint wp : cache.getWaypoints()) {
                if (wp.isCalculated()) {
                    final CalculatedCoordinate cc = CalculatedCoordinate.createFromConfig(wp.getCalcStateConfig());
                    neededVars.addAll(cc.getNeededVars());
                }
                if (wp.hasProjection()) {
                    FormulaUtils.addNeededVariables(neededVars, wp.getProjectionFormula1());
                    FormulaUtils.addNeededVariables(neededVars, wp.getProjectionFormula2());
                }
            }
        }
    }
Stores cache variables including view state (e.g. ordering).
This class handles persistence (load-from/store-to DB), allows for reset and change listeners.
main/src/main/java/cgeo/geocaching/models/CacheVariableList.java