{"owner":"alibaba","repo":"jetcache","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# JetCache Agent Instructions\n\n## Project Overview\n\nJetCache is a Java cache abstraction library (groupId `com.alicp.jetcache`) providing uniform API over Redis (Jedis/Lettuce/Spring Data/Redisson), Caffeine, and LinkedHashMap. Supports annotations (`@Cached`, `@CacheUpdate`, `@CacheInvalidate`) and programmatic `Cache` API with two-level caching, TTL, auto-refresh, and distributed lock.\n\n- Source/target: Java 17 (compiled with `-parameters`, enforcer requires JDK 17+)\n- CI JDK: 17 (Temurin)\n- Version: 2.8.x-SNAPSHOT\n\n## Module Structure\n\n```\njetcache-anno-api/     Annotations and constants only (no dependencies)\njetcache-core/         Core Cache API, CacheManager, embedded/external cache implementations\njetcache-anno/         Spring AOP-based annotation processing (depends on core)\njetcache-support/      Redis driver adapters:\n  jetcache-redis/            Jedis 7.x\n  jetcache-redis-lettuce/    Lettuce\n  jetcache-redis-springdata/ Spring Data Redis 4.x (uses Lettuce, not Jedis)\n  jetcache-redisson/         Redisson 4.x\njetcache-starter/      Spring Boot autoconfigure and starters:\n  jetcache-autoconfigure/         Pulls all support modules (optional)\n  jetcache-starter-redis/         etc.\njetcache-test/         All tests live here (aggregates all modules); uses JaCoCo for coverage\njetcache-parent/       Shared build config, PMD (Alibaba p3c rules), surefire settings\njetcache-bom/          Bill of Materials, dependency version management\nsamples/               NOT part of root build (separate pom, different groupId)\n```\n\nDependency chain: `anno-api <- core <- anno <- autoconfigure`, `core <- support/* <- starter/*`.\n\n## Build & Test Commands\n\n```bash\n# Full build (no tests)\nmvn -DskipTests clean install\n\n# Run all tests (requires Redis, see below)\nmvn clean test\n\n# Run a single test class\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest\n\n# Run a single test method\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest#testExpressionEvaluator\n```\n\nSurefire includes: `**/Test*.java`, `**/*Test.java`, `**/*Tests.java`, `**/*TestCase.java`. Surefire excludes `@Tag(\"slow\")` tests (currently none tagged).\n\n### macOS: Tests Needing Redis\n\nThe `docker-compose.yml` uses `network_mode: \"host\"`, which **does not work on macOS Docker**. Redis cluster tests skip themselves on Mac/Windows (runtime check in `RedisLettuceCacheTest.checkOS()`). To run the full suite on macOS, use the Docker-in-Docker approach from `Building.txt`:\n\n```bash\ndocker compose up -d   # Linux only\n# macOS alternative:\ndocker run -it --rm --network host -v $HOME/.m2:/root/.m2 -v $(pwd):/usr/src/mymaven -w /usr/src/mymaven maven:3.9-eclipse-temurin-17 mvn clean test\n```\n\n### Quick local Redis for partial testing (Windows/Mac)\n\n```bash\ndocker run --rm -it -p 6379-6381:6379-6381 -p 26379-26381:26379-26381 areyouok/redis-sentinel\n```\n\nThis gives standalone + sentinel but **not** cluster mode. Cluster tests will skip.\n\n## Verification\n\n```bash\nmvn clean test           # after `docker compose up` on Linux\nmvn verify               # also runs PMD check (Alibaba p3c ruleset)\n```\n\n## Conventions\n\n- JUnit Jupiter only (JUnit 4 removed; no vintage engine). JUnit BOM version: 6.x\n- Test dependencies: JUnit Jupiter 6.x, Mockito 5.x, Spring Test\n- PMD uses Alibaba p3c rules (`p3c-pmd:1.3.6`) during `verify` phase\n- The `-parameters` javac flag is required for SpEL annotation key expressions to work (also must be set in IDE settings, not just pom)\n- `samples/` has its own build chain with its own version of jetcache; it is not a module of the main build\n\n## Test Caveats\n\n- Tests can be flaky on busy machines: many tests use short `sleep()` to verify TTL/expiry behavior, so GC pauses or high load can cause false failures\n- Full test suite takes a few minutes to run\n- Tests needing Redis (e.g. `RedisCacheTest`, `RedisLettuceCacheTest`, `RedissonCacheTest`, starter tests) will fail or skip without a running Redis\n- Redis cluster tests auto-skip on Mac/Windows via `RedisLettuceCacheTest.checkOS()` — only standalone and sentinel tests work there\n\n## Compatibility Notes (see `docs/EN/Compatibility.md`)\n\n- Spring/Spring Boot version support varies by jetcache version; current (2.8.0) BOM defaults to Spring Framework 7.0.7 / Spring Boot 4.0.6 / Spring Data Redis 4.0.5 / SLF4J 2.x, but Spring 6.x / Spring Boot 3.x (also Java 17+) is also supported by adjusting BOM properties\n- `jetcache-redis` (Jedis 7.x) and `jetcache-redis-springdata` (Lettuce) use different Redis clients; `jetcache-redis` uses Jedis 7.x which may conflict with other Jedis versions on classpath\n- Since 2.8.0: fastjson1 is **removed**; the `FASTJSON` keyConvertor now uses fastjson2 internally. Default keyConvertor is `fastjson2`\n- Since 2.8.0: kryo4 is **dropped**. Both `KRYO` and `KRYO5` constants now use kryo5 implementation internally (`com.esotericsoftware:kryo` is 5.6.2, same as `com.esotericsoftware.kryo:kryo5`). Old kryo4 serialized data is **not compatible** with kryo5\n- Since 2.8.0: Spring XML namespace support (`<jetcache:xxx>`) is **removed**\n- Since 2.8.0: **Deserialization filter is enabled by default** — a breaking change. Cached values containing custom classes not in the default allow list will fail to deserialize. Add `decodeFilterAllowPatterns` (e.g. `com.yourcompany.`) or set `decodeFilterEnabled: false` to restore old behavior. See `docs/EN/Config.md` for default allow list\n- Since 2.8.0: `JACKSON3` added as valueEncoder/valueDecoder and keyConvertor option (uses `tools.jackson` 3.x)\n- `areaInCacheName` default changed to `false` in 2.7 (was `true` in 2.6 and earlier); since 2.8.0 this is also `false`\n- JSON serializers (fastjson2/jackson/jackson3) are **not registered by default** as valueEncoder/valueDecoder due to type-safety concerns with `Object` fields. Only `java` and `kryo`/`kryo5` are registered\n- `@Cached` uses Spring AOP (proxy-based); self-invocation within the same class bypasses the cache\n\n## Key Convertor / Value Encoder-Decoder Choices (2.8)\n\n- keyConvertor: `fastjson2` (default) / `fastjson` (same as fastjson2) / `jackson` / `jackson3` / `none` (local only)\n- valueEncoder/valueDecoder: `java` (default) / `kryo` (kryo5 impl) / `kryo5` (kryo5 impl). `fastjson2` / `jackson` / `jackson3` available but not registered by default\n\n## Code Reading Guide (see `docs/CN/DevNote.md`)\n\nKey `Cache` interface implementations:\n- `RedisCache` / `RedisLettuceCache` / `RedisSpringDataCache` / `RedissonCache`: external Redis backends\n- `CaffeineCache` / `LinkedHashMapCache`: in-memory\n- `LoadingCache`: decorator adding auto-load via `CacheLoader`\n- `RefreshCache`: decorator adding auto-refresh\n- `MultiLevelCache`: multi-level (supports N levels, annotation config only uses 2)\n\nAnnotation processing entry points: `EnableMethodCache`, `EnableCreateCacheAnnotation` (in `jetcache-anno`)\n"},"files":{"AGENTS.md":"# JetCache Agent Instructions\n\n## Project Overview\n\nJetCache is a Java cache abstraction library (groupId `com.alicp.jetcache`) providing uniform API over Redis (Jedis/Lettuce/Spring Data/Redisson), Caffeine, and LinkedHashMap. Supports annotations (`@Cached`, `@CacheUpdate`, `@CacheInvalidate`) and programmatic `Cache` API with two-level caching, TTL, auto-refresh, and distributed lock.\n\n- Source/target: Java 17 (compiled with `-parameters`, enforcer requires JDK 17+)\n- CI JDK: 17 (Temurin)\n- Version: 2.8.x-SNAPSHOT\n\n## Module Structure\n\n```\njetcache-anno-api/     Annotations and constants only (no dependencies)\njetcache-core/         Core Cache API, CacheManager, embedded/external cache implementations\njetcache-anno/         Spring AOP-based annotation processing (depends on core)\njetcache-support/      Redis driver adapters:\n  jetcache-redis/            Jedis 7.x\n  jetcache-redis-lettuce/    Lettuce\n  jetcache-redis-springdata/ Spring Data Redis 4.x (uses Lettuce, not Jedis)\n  jetcache-redisson/         Redisson 4.x\njetcache-starter/      Spring Boot autoconfigure and starters:\n  jetcache-autoconfigure/         Pulls all support modules (optional)\n  jetcache-starter-redis/         etc.\njetcache-test/         All tests live here (aggregates all modules); uses JaCoCo for coverage\njetcache-parent/       Shared build config, PMD (Alibaba p3c rules), surefire settings\njetcache-bom/          Bill of Materials, dependency version management\nsamples/               NOT part of root build (separate pom, different groupId)\n```\n\nDependency chain: `anno-api <- core <- anno <- autoconfigure`, `core <- support/* <- starter/*`.\n\n## Build & Test Commands\n\n```bash\n# Full build (no tests)\nmvn -DskipTests clean install\n\n# Run all tests (requires Redis, see below)\nmvn clean test\n\n# Run a single test class\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest\n\n# Run a single test method\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest#testExpressionEvaluator\n```\n\nSurefire includes: `**/Test*.java`, `**/*Test.java`, `**/*Tests.java`, `**/*TestCase.java`. Surefire excludes `@Tag(\"slow\")` tests (currently none tagged).\n\n### macOS: Tests Needing Redis\n\nThe `docker-compose.yml` uses `network_mode: \"host\"`, which **does not work on macOS Docker**. Redis cluster tests skip themselves on Mac/Windows (runtime check in `RedisLettuceCacheTest.checkOS()`). To run the full suite on macOS, use the Docker-in-Docker approach from `Building.txt`:\n\n```bash\ndocker compose up -d   # Linux only\n# macOS alternative:\ndocker run -it --rm --network host -v $HOME/.m2:/root/.m2 -v $(pwd):/usr/src/mymaven -w /usr/src/mymaven maven:3.9-eclipse-temurin-17 mvn clean test\n```\n\n### Quick local Redis for partial testing (Windows/Mac)\n\n```bash\ndocker run --rm -it -p 6379-6381:6379-6381 -p 26379-26381:26379-26381 areyouok/redis-sentinel\n```\n\nThis gives standalone + sentinel but **not** cluster mode. Cluster tests will skip.\n\n## Verification\n\n```bash\nmvn clean test           # after `docker compose up` on Linux\nmvn verify               # also runs PMD check (Alibaba p3c ruleset)\n```\n\n## Conventions\n\n- JUnit Jupiter only (JUnit 4 removed; no vintage engine). JUnit BOM version: 6.x\n- Test dependencies: JUnit Jupiter 6.x, Mockito 5.x, Spring Test\n- PMD uses Alibaba p3c rules (`p3c-pmd:1.3.6`) during `verify` phase\n- The `-parameters` javac flag is required for SpEL annotation key expressions to work (also must be set in IDE settings, not just pom)\n- `samples/` has its own build chain with its own version of jetcache; it is not a module of the main build\n\n## Test Caveats\n\n- Tests can be flaky on busy machines: many tests use short `sleep()` to verify TTL/expiry behavior, so GC pauses or high load can cause false failures\n- Full test suite takes a few minutes to run\n- Tests needing Redis (e.g. `RedisCacheTest`, `RedisLettuceCacheTest`, `RedissonCacheTest`, starter tests) will fail or skip without a running Redis\n- Redis cluster tests auto-skip on Mac/Windows via `RedisLettuceCacheTest.checkOS()` — only standalone and sentinel tests work there\n\n## Compatibility Notes (see `docs/EN/Compatibility.md`)\n\n- Spring/Spring Boot version support varies by jetcache version; current (2.8.0) BOM defaults to Spring Framework 7.0.7 / Spring Boot 4.0.6 / Spring Data Redis 4.0.5 / SLF4J 2.x, but Spring 6.x / Spring Boot 3.x (also Java 17+) is also supported by adjusting BOM properties\n- `jetcache-redis` (Jedis 7.x) and `jetcache-redis-springdata` (Lettuce) use different Redis clients; `jetcache-redis` uses Jedis 7.x which may conflict with other Jedis versions on classpath\n- Since 2.8.0: fastjson1 is **removed**; the `FASTJSON` keyConvertor now uses fastjson2 internally. Default keyConvertor is `fastjson2`\n- Since 2.8.0: kryo4 is **dropped**. Both `KRYO` and `KRYO5` constants now use kryo5 implementation internally (`com.esotericsoftware:kryo` is 5.6.2, same as `com.esotericsoftware.kryo:kryo5`). Old kryo4 serialized data is **not compatible** with kryo5\n- Since 2.8.0: Spring XML namespace support (`<jetcache:xxx>`) is **removed**\n- Since 2.8.0: **Deserialization filter is enabled by default** — a breaking change. Cached values containing custom classes not in the default allow list will fail to deserialize. Add `decodeFilterAllowPatterns` (e.g. `com.yourcompany.`) or set `decodeFilterEnabled: false` to restore old behavior. See `docs/EN/Config.md` for default allow list\n- Since 2.8.0: `JACKSON3` added as valueEncoder/valueDecoder and keyConvertor option (uses `tools.jackson` 3.x)\n- `areaInCacheName` default changed to `false` in 2.7 (was `true` in 2.6 and earlier); since 2.8.0 this is also `false`\n- JSON serializers (fastjson2/jackson/jackson3) are **not registered by default** as valueEncoder/valueDecoder due to type-safety concerns with `Object` fields. Only `java` and `kryo`/`kryo5` are registered\n- `@Cached` uses Spring AOP (proxy-based); self-invocation within the same class bypasses the cache\n\n## Key Convertor / Value Encoder-Decoder Choices (2.8)\n\n- keyConvertor: `fastjson2` (default) / `fastjson` (same as fastjson2) / `jackson` / `jackson3` / `none` (local only)\n- valueEncoder/valueDecoder: `java` (default) / `kryo` (kryo5 impl) / `kryo5` (kryo5 impl). `fastjson2` / `jackson` / `jackson3` available but not registered by default\n\n## Code Reading Guide (see `docs/CN/DevNote.md`)\n\nKey `Cache` interface implementations:\n- `RedisCache` / `RedisLettuceCache` / `RedisSpringDataCache` / `RedissonCache`: external Redis backends\n- `CaffeineCache` / `LinkedHashMapCache`: in-memory\n- `LoadingCache`: decorator adding auto-load via `CacheLoader`\n- `RefreshCache`: decorator adding auto-refresh\n- `MultiLevelCache`: multi-level (supports N levels, annotation config only uses 2)\n\nAnnotation processing entry points: `EnableMethodCache`, `EnableCreateCacheAnnotation` (in `jetcache-anno`)\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# JetCache Agent Instructions\n\n## Project Overview\n\nJetCache is a Java cache abstraction library (groupId `com.alicp.jetcache`) providing uniform API over Redis (Jedis/Lettuce/Spring Data/Redisson), Caffeine, and LinkedHashMap. Supports annotations (`@Cached`, `@CacheUpdate`, `@CacheInvalidate`) and programmatic `Cache` API with two-level caching, TTL, auto-refresh, and distributed lock.\n\n- Source/target: Java 17 (compiled with `-parameters`, enforcer requires JDK 17+)\n- CI JDK: 17 (Temurin)\n- Version: 2.8.x-SNAPSHOT\n\n## Module Structure\n\n```\njetcache-anno-api/     Annotations and constants only (no dependencies)\njetcache-core/         Core Cache API, CacheManager, embedded/external cache implementations\njetcache-anno/         Spring AOP-based annotation processing (depends on core)\njetcache-support/      Redis driver adapters:\n  jetcache-redis/            Jedis 7.x\n  jetcache-redis-lettuce/    Lettuce\n  jetcache-redis-springdata/ Spring Data Redis 4.x (uses Lettuce, not Jedis)\n  jetcache-redisson/         Redisson 4.x\njetcache-starter/      Spring Boot autoconfigure and starters:\n  jetcache-autoconfigure/         Pulls all support modules (optional)\n  jetcache-starter-redis/         etc.\njetcache-test/         All tests live here (aggregates all modules); uses JaCoCo for coverage\njetcache-parent/       Shared build config, PMD (Alibaba p3c rules), surefire settings\njetcache-bom/          Bill of Materials, dependency version management\nsamples/               NOT part of root build (separate pom, different groupId)\n```\n\nDependency chain: `anno-api <- core <- anno <- autoconfigure`, `core <- support/* <- starter/*`.\n\n## Build & Test Commands\n\n```bash\n# Full build (no tests)\nmvn -DskipTests clean install\n\n# Run all tests (requires Redis, see below)\nmvn clean test\n\n# Run a single test class\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest\n\n# Run a single test method\nmvn -pl jetcache-test test -Dtest=CacheHandlerTest#testExpressionEvaluator\n```\n\nSurefire includes: `**/Test*.java`, `**/*Test.java`, `**/*Tests.java`, `**/*TestCase.java`. Surefire excludes `@Tag(\"slow\")` tests (currently none tagged).\n\n### macOS: Tests Needing Redis\n\nThe `docker-compose.yml` uses `network_mode: \"host\"`, which **does not work on macOS Docker**. Redis cluster tests skip themselves on Mac/Windows (runtime check in `RedisLettuceCacheTest.checkOS()`). To run the full suite on macOS, use the Docker-in-Docker approach from `Building.txt`:\n\n```bash\ndocker compose up -d   # Linux only\n# macOS alternative:\ndocker run -it --rm --network host -v $HOME/.m2:/root/.m2 -v $(pwd):/usr/src/mymaven -w /usr/src/mymaven maven:3.9-eclipse-temurin-17 mvn clean test\n```\n\n### Quick local Redis for partial testing (Windows/Mac)\n\n```bash\ndocker run --rm -it -p 6379-6381:6379-6381 -p 26379-26381:26379-26381 areyouok/redis-sentinel\n```\n\nThis gives standalone + sentinel but **not** cluster mode. Cluster tests will skip.\n\n## Verification\n\n```bash\nmvn clean test           # after `docker compose up` on Linux\nmvn verify               # also runs PMD check (Alibaba p3c ruleset)\n```\n\n## Conventions\n\n- JUnit Jupiter only (JUnit 4 removed; no vintage engine). JUnit BOM version: 6.x\n- Test dependencies: JUnit Jupiter 6.x, Mockito 5.x, Spring Test\n- PMD uses Alibaba p3c rules (`p3c-pmd:1.3.6`) during `verify` phase\n- The `-parameters` javac flag is required for SpEL annotation key expressions to work (also must be set in IDE settings, not just pom)\n- `samples/` has its own build chain with its own version of jetcache; it is not a module of the main build\n\n## Test Caveats\n\n- Tests can be flaky on busy machines: many tests use short `sleep()` to verify TTL/expiry behavior, so GC pauses or high load can cause false failures\n- Full test suite takes a few minutes to run\n- Tests needing Redis (e.g. `RedisCacheTest`, `RedisLettuceCacheTest`, `RedissonCacheTest`, starter tests) will fail or skip without a running Redis\n- Redis cluster tests auto-skip on Mac/Windows via `RedisLettuceCacheTest.checkOS()` — only standalone and sentinel tests work there\n\n## Compatibility Notes (see `docs/EN/Compatibility.md`)\n\n- Spring/Spring Boot version support varies by jetcache version; current (2.8.0) BOM defaults to Spring Framework 7.0.7 / Spring Boot 4.0.6 / Spring Data Redis 4.0.5 / SLF4J 2.x, but Spring 6.x / Spring Boot 3.x (also Java 17+) is also supported by adjusting BOM properties\n- `jetcache-redis` (Jedis 7.x) and `jetcache-redis-springdata` (Lettuce) use different Redis clients; `jetcache-redis` uses Jedis 7.x which may conflict with other Jedis versions on classpath\n- Since 2.8.0: fastjson1 is **removed**; the `FASTJSON` keyConvertor now uses fastjson2 internally. Default keyConvertor is `fastjson2`\n- Since 2.8.0: kryo4 is **dropped**. Both `KRYO` and `KRYO5` constants now use kryo5 implementation internally (`com.esotericsoftware:kryo` is 5.6.2, same as `com.esotericsoftware.kryo:kryo5`). Old kryo4 serialized data is **not compatible** with kryo5\n- Since 2.8.0: Spring XML namespace support (`<jetcache:xxx>`) is **removed**\n- Since 2.8.0: **Deserialization filter is enabled by default** — a breaking change. Cached values containing custom classes not in the default allow list will fail to deserialize. Add `decodeFilterAllowPatterns` (e.g. `com.yourcompany.`) or set `decodeFilterEnabled: false` to restore old behavior. See `docs/EN/Config.md` for default allow list\n- Since 2.8.0: `JACKSON3` added as valueEncoder/valueDecoder and keyConvertor option (uses `tools.jackson` 3.x)\n- `areaInCacheName` default changed to `false` in 2.7 (was `true` in 2.6 and earlier); since 2.8.0 this is also `false`\n- JSON serializers (fastjson2/jackson/jackson3) are **not registered by default** as valueEncoder/valueDecoder due to type-safety concerns with `Object` fields. Only `java` and `kryo`/`kryo5` are registered\n- `@Cached` uses Spring AOP (proxy-based); self-invocation within the same class bypasses the cache\n\n## Key Convertor / Value Encoder-Decoder Choices (2.8)\n\n- keyConvertor: `fastjson2` (default) / `fastjson` (same as fastjson2) / `jackson` / `jackson3` / `none` (local only)\n- valueEncoder/valueDecoder: `java` (default) / `kryo` (kryo5 impl) / `kryo5` (kryo5 impl). `fastjson2` / `jackson` / `jackson3` available but not registered by default\n\n## Code Reading Guide (see `docs/CN/DevNote.md`)\n\nKey `Cache` interface implementations:\n- `RedisCache` / `RedisLettuceCache` / `RedisSpringDataCache` / `RedissonCache`: external Redis backends\n- `CaffeineCache` / `LinkedHashMapCache`: in-memory\n- `LoadingCache`: decorator adding auto-load via `CacheLoader`\n- `RefreshCache`: decorator adding auto-refresh\n- `MultiLevelCache`: multi-level (supports N levels, annotation config only uses 2)\n\nAnnotation processing entry points: `EnableMethodCache`, `EnableCreateCacheAnnotation` (in `jetcache-anno`)\n","category":"root","tokens":1708}]}