GENTLE 的 GENTLE.config 配置

本文详细介绍了Gentle框架中的缓存配置选项及其作用。包括默认缓存策略、是否缓存SQL语句、是否缓存对象、是否跳过查询执行及唯一性范围等设置。通过这些配置可以有效提升应用性能。

 1 sample Gentle.config file
     http://www.mertner.com/svn/repos/projects/gentle/Configuration/Gentle.config

     如果不单独配置 Gentle.config,可将其放到项目的Config里,Asp.net为web.config,以下为App.config例子
     http://www.mertner.com/svn/repos/projects/gentle/Configuration/App.config   

 

 2.1, Cache  from: http://www.mertner.com/confluence/pages/viewpage.action?pageId=596
     
     
Configuration
Key
DescriptionPossible
Values
Default
Value
DefaultStrategyControls the default cache strategy applied to objects (only used if CacheObjects is true). This can be overridden on a class basis using the CacheStrategy property of the TableName attribute. Never disables caching entirely. Temporary permits cached entries to be garbage collected, whereas Permanent (NOT recommended as default setting) disallows this.Never,

Permanent,

Temporary

Temporary
CacheStatementsSpecifies whether auto-generated CRUD statements are cached. Statements created using SqlBuilder or any other means must be cached manually.true,

false

true
CacheObjectsSpecifies whether objects are cached.true,

false

false
SkipQueryExecutionSpecifies whether Gentle should be allowed to construct results using cached data alone. This can result in a dramatic speed increase, but only works if both statements and objects are being cached.true,

false

false
UniqingScopeSpecified the scope within which to perform uniqing. Application scope means globally within an AppDomain. Thread means objects are uniqued within a single executing thread. WebSession means that objects are uniqued within a web session (if available, otherwise Application scope is used).Application,
Thread,
WebSession
Thread

    
sample:

None.gif < Cache >
None.gif    
< DefaultStrategy > Temporary </ DefaultStrategy >
None.gif    
< CacheStatements > true </ CacheStatements >
None.gif    
< CacheObjects > true </ CacheObjects >
None.gif    
< SkipQueryExecution > false </ SkipQueryExecution >
None.gif    
< UniqingScope > Thread </ UniqingScope >
None.gif
</ Cache >




    

转载于:https://www.cnblogs.com/day/archive/2006/02/07/326605.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值