doc[zfoo]: update doc

This commit is contained in:
godotg
2022-10-17 17:43:25 +08:00
parent 844b9cf6d2
commit a8eb352284
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ HotSwapUtils.hotswapClass(bytes);
```
// 无需自己写sql和任何配置,直接通过注解定义在数据库中定义一张表
@EntityCache(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
@EntityCache
public class UserEntity implements IEntity<Long> {
@Id
private long id;
+1 -1
View File
@@ -134,7 +134,7 @@ HotSwapUtils.hotswapClass(bytes);
```
// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions
@EntityCache(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
@EntityCache
public class UserEntity implements IEntity<Long> {
@Id
private long id;
+3 -3
View File
@@ -56,14 +56,14 @@ var collection = OrmContext.getOrmManager().getCollection(UserEntity.class)
<!-- 缓存策略 -->
<orm:caches>
<orm:cache strategy="hundred" size="100" expire-millisecond="600000"/>
<orm:cache strategy="default" size="6000" expire-millisecond="600000"/>
<orm:cache strategy="thousand" size="1000" expire-millisecond="600000"/>
<orm:cache strategy="threeThousand" size="3000" expire-millisecond="600000"/>
</orm:caches>
<!-- 持久化策略 -->
<orm:persisters>
<orm:persister strategy="cronDefault" type="cron" config="0,30 * * * * ?"/>
<orm:persister strategy="default" type="time" config="600000"/>
<orm:persister strategy="cron30s" type="cron" config="0/30 * * * * ?"/>
<orm:persister strategy="time30s" type="time" config="30000"/>
</orm:persisters>
@@ -76,7 +76,7 @@ address表示数据库的地址,支持分片的配置
- 通过注解引入映射
```
@EntityCaches(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
@EntityCaches(cacheStrategy = @Cache("tenThousand"), persister = @Persister("time30s"))
public class UserEntity implements IEntity<Long> {
}
+1 -1
View File
@@ -35,7 +35,7 @@
<!-- 持久化策略 -->
<orm:persisters>
<orm:persister strategy="default" type="cron" config="0,30 * * * * ?"/>
<orm:persister strategy="default" type="time" config="600000"/>
<orm:persister strategy="cron30s" type="cron" config="0/30 * * * * ?"/>
<orm:persister strategy="time30s" type="time" config="30000"/>
</orm:persisters>