refactored cache/storage to plugin