LoadCache 1.0.1
5/28/2014

Loadcache is designed to be a threaded application for preloading all VCubes at the same time if desired.
 The built in functionality for preloading VCubes at startup is limited to loading one at a time on one server at a time.
 This can greatly increase startup time.  This tool can bring your total load for all cubes to just a few seconds over the
 longest vcube load time thus eliminating both long startup time and first load user penalty.  This tool can also be called 
 automatically at any time and after load jobs to automatically prime any cache that has been invalidated to avoid first
 load user penalties.

Installation:

This utility relies on the FM/ODCS Midtier for the SASVersionedJarRepository to match up with the included picklist.  It
 should be installed on any midtier with FM or ODCS installed and run from that tier.

Extract the contents of the zip to any desired location on the midtier that it will be run.

Configuration:

Edit the loadcache.ini file to adapt the following properties section to match your configuraton.  Encrypted passwords are
 strongly encouraged and supported through SAS proc pwencode 'in=yourpassword'; run;

[properties]
MASTERPROP="C:\Program Files\SASHome\sassw.config"
LAUNCHERDIR="C:\loadCache_5.4\"
USER=sasdemo
PASS=DemoDemo1
SASSERVER3HOST=midtierServer3.mycompany.com
SASSERVER4HOST=midtierServer4.mycompany.com
;Use standard reverse proxy server (SAS Web Server) port when available
SASSERVER3PORT=80
SASSERVER4PORT=80
;Use VCubeIDs or VCube codes
VCUBEID="1,2,4"
;Number of threads will be the number of CPU threads used at once.  This number 
;should not exceed available threads.  Setting it to 2x number of cubes is optimal.
THREADS=4
FLUSHCACHE=false

VCUBEID can be set to either the vcubeid or vcube code.  
THREADS should not exceed the maximum threads supported by the midtier
 system or (number of cubes)*2+1, whichever is lower.  Setting this value to higher than the total number of cubes to load
 across both server (numCubes*2+1) provides no further performance improvement as each individual cube load is single threaded.
FLUSHCACHE when set to true will flush both SASServer3 and SASServer4 in memory caches.  On subsequent loadcache, preferential order
 is file cache and then database if no file cache.  Can be used in conjunction with -Dodcs.fact.serialization.enabled=false to disable
 file cache to allow fresh database load each time at the cost of performance of that first load.
 
If on Linux, adapt all ; to : in any variable or argument.

Usage:

From commandline or job, call loadcache(.exe)


Troubleshooting:

In the included loadcache-log4j.xml DEBUG can be set for any entry to increase logging detail to troubleshoot any problems

Error:  java.lang.RuntimeException: com.sas.app.RepositoryException: For one or more plugin requests, no matching Plugins were found
	in repository: sastpj.rutil, sas.rutil.nls, sas.rutil
	
Resolution:  You do not have SASSecure installed and will need to remove the bottom 3 lines of the picklist file that includes those 3 
	entries

Advanced topics:

Automated loading of invalidated cubes can be achieved by setting Hyperic to monitor the FM log for the cube invalidation INFO
level logging and setting the action to run the loadcache program.  Overhead of already loaded cubes is minimal.  