code: private static boolean hasCachePermission() {
  		Boolean hasPermission = getCacheInfo().getHasPermission();
  
  		if (hasPermission != null) {
  			return hasPermission.booleanValue();
  		} else {
  			try {
  				SecurityManager security = System.getSecurityManager();
  				if (security != null) {
  					File cachedir = getCacheDirectory();
  					String cachepath;
  
  					if (cachedir != null) {
  						cachepath = cachedir.getPath();
  					} else {
  						cachepath = getTempDir();
  
  						if (cachepath == null) {
  							getCacheInfo().setHasPermission(Boolean.FALSE);
  							return false;
  						}
  					}
  
  					security.checkWrite(cachepath);
  				}
  			} catch (SecurityException e) {
  				getCacheInfo().setHasPermission(Boolean.FALSE);
  				return false;
  			}
  
  			getCacheInfo().setHasPermission(Boolean.TRUE);
  			return true;
  		}
  	}
docs: Determines whether the caller has write access to the cache directory, stores the result in the
  <code>CacheInfo</code> object, and returns the decision. This method helps to prevent mysterious
  SecurityExceptions to be thrown when this convenience class is used in an applet, for example.