use dirname(__FILE__) for cache path;  serialize() for cache; remove the else part