From 062919e08cde405071c7b78a55b9a08cefa414a4 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Thu, 10 Jun 2021 19:52:55 +0300 Subject: [PATCH] deprecate cache backend (#5382) --- README.md | 1 - backend/cache/cache.go | 6 ++++++ docs/content/_index.md | 1 - docs/content/cache.md | 2 +- docs/content/docs.md | 1 - docs/layouts/chrome/navbar.html | 1 - 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 115f37161..7c7f1d56c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,6 @@ Please see [the full list of all storage providers and their features](https://r * Optional large file chunking ([Chunker](https://rclone.org/chunker/)) * Optional transparent compression ([Compress](https://rclone.org/compress/)) * Optional encryption ([Crypt](https://rclone.org/crypt/)) - * Optional cache ([Cache](https://rclone.org/cache/)) * Optional FUSE mount ([rclone mount](https://rclone.org/commands/rclone_mount/)) * Multi-threaded downloads to local disk * Can [serve](https://rclone.org/commands/rclone_serve/) local or remote files over HTTP/WebDav/FTP/SFTP/dlna diff --git a/backend/cache/cache.go b/backend/cache/cache.go index b55fa6061..b5a16f9d6 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -339,8 +339,14 @@ func parseRootPath(path string) (string, error) { return strings.Trim(path, "/"), nil } +var warnDeprecated sync.Once + // NewFs constructs an Fs from the path, container:path func NewFs(ctx context.Context, name, rootPath string, m configmap.Mapper) (fs.Fs, error) { + warnDeprecated.Do(func() { + fs.Logf(nil, "WARNING: Cache backend is deprecated and may be removed in future. Please use VFS instead.") + }) + // Parse config into Options struct opt := new(Options) err := configstruct.Set(m, opt) diff --git a/docs/content/_index.md b/docs/content/_index.md index e1e72cde1..726e838e2 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -43,7 +43,6 @@ using local disk. Virtual backends wrap local and cloud file systems to apply [encryption](/crypt/), -[caching](/cache/), [compression](/compress/) [chunking](/chunker/) and [joining](/union/). diff --git a/docs/content/cache.md b/docs/content/cache.md index 6b9e8a3fc..2c6d6f8d0 100644 --- a/docs/content/cache.md +++ b/docs/content/cache.md @@ -3,7 +3,7 @@ title: "Cache" description: "Rclone docs for cache remote" --- -{{< icon "fa fa-archive" >}} Cache (BETA) +{{< icon "fa fa-archive" >}} Cache (DEPRECATED) ----------------------------------------- The `cache` remote wraps another existing remote and stores file structure diff --git a/docs/content/docs.md b/docs/content/docs.md index dad145e44..0e927f90b 100644 --- a/docs/content/docs.md +++ b/docs/content/docs.md @@ -24,7 +24,6 @@ See the following for detailed instructions for * [Amazon S3](/s3/) * [Backblaze B2](/b2/) * [Box](/box/) - * [Cache](/cache/) * [Chunker](/chunker/) - transparently splits large files for other remotes * [Citrix ShareFile](/sharefile/) * [Compress](/compress/) diff --git a/docs/layouts/chrome/navbar.html b/docs/layouts/chrome/navbar.html index 6939a2a30..749e05d06 100644 --- a/docs/layouts/chrome/navbar.html +++ b/docs/layouts/chrome/navbar.html @@ -67,7 +67,6 @@ Amazon S3 Backblaze B2 Box - Cache Chunker (splits large files) Compress (transparent gzip compression) Citrix ShareFile