tweak to prevent ShelveCache from being initialized when not needed

Currently ShelveCache is initialized even when a different cache is specified.  This causes issues if we have not configured the "cache" directory properly.  This pull request changes the module to only initialize ShelveCache when it is actually needed.