From 1a39411a807cd7747d68109e81416f6246dad6a9 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 17 Nov 2026 12:43:36 +0900 Subject: [PATCH 1/2] Point the attribute docblocks to the manual --- src/Annotation/CacheDir.php | 3 +++ src/Annotation/CacheNamespace.php | 3 +++ src/Annotation/Local.php | 3 +++ src/Annotation/MemcacheConfig.php | 3 +++ src/Annotation/RedisConfig.php | 3 +++ src/Annotation/Shared.php | 3 +++ 6 files changed, 18 insertions(+) diff --git a/src/Annotation/CacheDir.php b/src/Annotation/CacheDir.php index 7d4644c..9bf7e48 100644 --- a/src/Annotation/CacheDir.php +++ b/src/Annotation/CacheDir.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the directory of the file-based cache adapters + */ #[Attribute(Attribute::TARGET_PARAMETER | Attribute::TARGET_METHOD)] #[Qualifier] final class CacheDir diff --git a/src/Annotation/CacheNamespace.php b/src/Annotation/CacheNamespace.php index 7a01598..d5fdbce 100644 --- a/src/Annotation/CacheNamespace.php +++ b/src/Annotation/CacheNamespace.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the namespace that separates the cache keys of an application + */ #[Attribute(Attribute::TARGET_PARAMETER | Attribute::TARGET_METHOD)] #[Qualifier] final class CacheNamespace diff --git a/src/Annotation/Local.php b/src/Annotation/Local.php index 0d6f64b..29ce29e 100644 --- a/src/Annotation/Local.php +++ b/src/Annotation/Local.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the cache that each web server keeps to itself + */ #[Attribute(Attribute::TARGET_PARAMETER | Attribute::TARGET_METHOD)] #[Qualifier] final class Local diff --git a/src/Annotation/MemcacheConfig.php b/src/Annotation/MemcacheConfig.php index 28a39de..285d2e9 100644 --- a/src/Annotation/MemcacheConfig.php +++ b/src/Annotation/MemcacheConfig.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the list of Memcached servers as [host, port] pairs + */ #[Attribute(Attribute::TARGET_METHOD)] #[Qualifier] final class MemcacheConfig diff --git a/src/Annotation/RedisConfig.php b/src/Annotation/RedisConfig.php index 220faa9..d045a42 100644 --- a/src/Annotation/RedisConfig.php +++ b/src/Annotation/RedisConfig.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the Redis server as a [host, port] pair + */ #[Attribute] #[Qualifier] final class RedisConfig diff --git a/src/Annotation/Shared.php b/src/Annotation/Shared.php index 79c4b5b..4338df9 100644 --- a/src/Annotation/Shared.php +++ b/src/Annotation/Shared.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the cache shared among the web servers + */ #[Attribute(Attribute::TARGET_PARAMETER | Attribute::TARGET_METHOD)] #[Qualifier] final class Shared From 3e82b862d105b812975f6ed147de1b39ee4b11d6 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 17 Nov 2026 13:09:43 +0900 Subject: [PATCH 2/2] Document the Redis database index and the shared cache scope --- src/Annotation/RedisConfig.php | 2 +- src/Annotation/Shared.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Annotation/RedisConfig.php b/src/Annotation/RedisConfig.php index d045a42..e6fee43 100644 --- a/src/Annotation/RedisConfig.php +++ b/src/Annotation/RedisConfig.php @@ -8,7 +8,7 @@ use Ray\Di\Di\Qualifier; /** - * Qualifies the Redis server as a [host, port] pair + * Qualifies the Redis server as [host, port, dbIndex?], where the optional dbIndex selects the database */ #[Attribute] #[Qualifier] diff --git a/src/Annotation/Shared.php b/src/Annotation/Shared.php index 4338df9..c73d3f3 100644 --- a/src/Annotation/Shared.php +++ b/src/Annotation/Shared.php @@ -8,7 +8,8 @@ use Ray\Di\Di\Qualifier; /** - * Qualifies the cache shared among the web servers + * Qualifies the shared cache, whose scope is set by the installed module + * (Psr6RedisModule and Psr6MemcachedModule share it among the web servers) */ #[Attribute(Attribute::TARGET_PARAMETER | Attribute::TARGET_METHOD)] #[Qualifier]