Class: TencentCloud::Ecdn::V20191012::Cache
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Ecdn::V20191012::Cache
- Defined in:
- lib/v20191012/models.rb
Overview
缓存配置简单版本,该版本不支持设置源站未返回max-age情况下的缓存规则。
Instance Attribute Summary collapse
-
#CacheRules ⇒ Object
on:开启 off:关闭 开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存 注意:此字段可能返回 null,表示取不到有效值。.
-
#FollowOrigin ⇒ Object
on:开启 off:关闭 开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存 注意:此字段可能返回 null,表示取不到有效值。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(cacherules = nil, followorigin = nil) ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize(cacherules = nil, followorigin = nil) ⇒ Cache
Returns a new instance of Cache.
84 85 86 87 |
# File 'lib/v20191012/models.rb', line 84 def initialize(cacherules=nil, followorigin=nil) @CacheRules = cacherules @FollowOrigin = followorigin end |
Instance Attribute Details
#CacheRules ⇒ Object
on:开启off:关闭开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存注意:此字段可能返回 null,表示取不到有效值。
82 83 84 |
# File 'lib/v20191012/models.rb', line 82 def CacheRules @CacheRules end |
#FollowOrigin ⇒ Object
on:开启off:关闭开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存注意:此字段可能返回 null,表示取不到有效值。
82 83 84 |
# File 'lib/v20191012/models.rb', line 82 def FollowOrigin @FollowOrigin end |
Instance Method Details
#deserialize(params) ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/v20191012/models.rb', line 89 def deserialize(params) unless params['CacheRules'].nil? @CacheRules = [] params['CacheRules'].each do |i| cacherule_tmp = CacheRule.new cacherule_tmp.deserialize(i) @CacheRules << cacherule_tmp end end @FollowOrigin = params['FollowOrigin'] end |