GENTLE 的 GENTLE.config 配置


 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
Description Possible
Values
Default
Value
DefaultStrategy Controls 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
CacheStatements Specifies whether auto-generated CRUD statements are cached. Statements created using SqlBuilder or any other means must be cached manually. true,

false

true
CacheObjects Specifies whether objects are cached. true,

false

false
SkipQueryExecution Specifies 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
UniqingScope Specified 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:

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




    
原文地址:https://www.cnblogs.com/day/p/326605.html