Filecache rewrite

see https://github.com/owncloud/core/pull/673