mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-20 18:05:38 +00:00
* Add tenant-partitioned L2 caches (#2956) When `tenantPartitionedCache` is enabled, each tenant gets its own cache namespace (keys include the tenant id), improving cache-hit ratio by preventing cross-tenant key collisions. Refactor BeanDescriptorCacheHelp to abstract base class with two concrete subclasses: - BeanDescriptorCacheHelpFixed - static cache refs (original behaviour) - BeanDescriptorCacheHelpPartitioned - per-request Supplier<> lookup so the correct tenant-scoped cache is resolved on each access Fix background-thread invalidation: clear(name) in partitioned mode now scans all matching cache entries by key prefix rather than calling tenantProvider.currentId() which is null/wrong on background executor threads. Add SpiCacheManager.clearTenant(tenantId) to allow removal of all cache entries for a deactivated tenant, preventing unbounded memory growth in long-running multi-tenant deployments. Also load cache settings (cacheMaxSize, cacheMaxIdleTime, etc.) from application properties - these were previously missing from loadSettings(). * Fix versions in test-java16 --------- Co-authored-by: robin.bygrave <robin.bygrave@eroad.com>
81 lines
2.1 KiB
XML
81 lines
2.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<artifactId>tests</artifactId>
|
|
<groupId>io.ebean</groupId>
|
|
<version>18.1.0</version>
|
|
</parent>
|
|
|
|
<artifactId>test-java16</artifactId>
|
|
|
|
<properties>
|
|
<maven.compiler.release>21</maven.compiler.release>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>io.ebean</groupId>
|
|
<artifactId>ebean-h2</artifactId>
|
|
<version>18.1.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>ch.qos.logback</groupId>
|
|
<artifactId>logback-classic</artifactId>
|
|
<version>1.3.12</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>io.ebean</groupId>
|
|
<artifactId>ebean-test</artifactId>
|
|
<version>18.1.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>io.ebean</groupId>
|
|
<artifactId>querybean-generator</artifactId>
|
|
<version>18.1.0</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
|
|
<plugin>
|
|
<groupId>io.ebean</groupId>
|
|
<artifactId>ebean-maven-plugin</artifactId>
|
|
<version>${ebean-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>main</id>
|
|
<phase>process-classes</phase>
|
|
<configuration>
|
|
<transformArgs>debug=0</transformArgs>
|
|
</configuration>
|
|
<goals>
|
|
<goal>enhance</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>test</id>
|
|
<phase>process-test-classes</phase>
|
|
<configuration>
|
|
<transformArgs>debug=0</transformArgs>
|
|
</configuration>
|
|
<goals>
|
|
<goal>testEnhance</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|
|
|