From 3eb6c8cc29ed891def1fd6ab2f9a10990067b773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 30 Jul 2019 22:21:09 +0200 Subject: [PATCH] Mention global cache & storage in readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf846078..15c7abe7 100644 --- a/README.md +++ b/README.md @@ -392,8 +392,9 @@ Connections listed in the `tenancy.redis.prefixed_connections` config array use ## Cache -Both `cache()` and `Cache` will use `Stancl\Tenancy\CacheManager`, which adds a tag (`prefix_base` + tenant UUID) to all methods called on it. +Both the `cache()` helper and the `Cache` facade will use `Stancl\Tenancy\CacheManager`, which adds a tag (`prefix_base` + tenant UUID) to all methods called on it. +If you need to store something in global, non-tenant cache, you can use the `GlobalCache` facade the same way you'd use the `Cache` facade. ## Filesystem/Storage @@ -475,6 +476,8 @@ Storage::disk('public')->put($filename, $data); Storage::disk('local')->put("public/$filename", $data); ``` +If you want to store something globally, simply create a new disk and *don't* add it to the `tenancy.filesystem.disks` config. + ## Artisan commands ```