Class: TencentCloud::Teo::V20220901::FollowOrigin

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20220901/models.rb

Overview

缓存遵循源站配置。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, defaultcache = nil, defaultcachestrategy = nil, defaultcachetime = nil) ⇒ FollowOrigin

Returns a new instance of FollowOrigin.



13020
13021
13022
13023
13024
13025
# File 'lib/v20220901/models.rb', line 13020

def initialize(switch=nil, defaultcache=nil, defaultcachestrategy=nil, defaultcachetime=nil)
  @Switch = switch
  @DefaultCache = defaultcache
  @DefaultCacheStrategy = defaultcachestrategy
  @DefaultCacheTime = defaultcachetime
end

Instance Attribute Details

#DefaultCacheObject

<li>on:开启;</li> <li>off:关闭。</li> <li>on:缓存;</li> <li>off:不缓存。</li> <li>on:使用默认缓存策略;</li> <li>off:不使用默认缓存策略。</li>

Parameters:

  • Switch:

    遵循源站配置开关,取值有:

  • DefaultCache:

    源站未返回 Cache-Control 头时,缓存/不缓存开关。当 Switch 为 on 时,此字段必填,当 Switch 为 off 时,无需填写此字段,若填写则不生效。取值有:

  • DefaultCacheStrategy:

    源站未返回 Cache-Control 头时,使用/不使用默认缓存策略开关。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheTime 不为 0 时,此字段必须为 off。取值有:

  • DefaultCacheTime:

    源站未返回 Cache-Control 头时,表示默认的缓存时间,单位为秒,取值:0-315360000。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheStrategy 为 on 时, 此字段必须为 0。



13018
13019
13020
# File 'lib/v20220901/models.rb', line 13018

def DefaultCache
  @DefaultCache
end

#DefaultCacheStrategyObject

<li>on:开启;</li> <li>off:关闭。</li> <li>on:缓存;</li> <li>off:不缓存。</li> <li>on:使用默认缓存策略;</li> <li>off:不使用默认缓存策略。</li>

Parameters:

  • Switch:

    遵循源站配置开关,取值有:

  • DefaultCache:

    源站未返回 Cache-Control 头时,缓存/不缓存开关。当 Switch 为 on 时,此字段必填,当 Switch 为 off 时,无需填写此字段,若填写则不生效。取值有:

  • DefaultCacheStrategy:

    源站未返回 Cache-Control 头时,使用/不使用默认缓存策略开关。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheTime 不为 0 时,此字段必须为 off。取值有:

  • DefaultCacheTime:

    源站未返回 Cache-Control 头时,表示默认的缓存时间,单位为秒,取值:0-315360000。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheStrategy 为 on 时, 此字段必须为 0。



13018
13019
13020
# File 'lib/v20220901/models.rb', line 13018

def DefaultCacheStrategy
  @DefaultCacheStrategy
end

#DefaultCacheTimeObject

<li>on:开启;</li> <li>off:关闭。</li> <li>on:缓存;</li> <li>off:不缓存。</li> <li>on:使用默认缓存策略;</li> <li>off:不使用默认缓存策略。</li>

Parameters:

  • Switch:

    遵循源站配置开关,取值有:

  • DefaultCache:

    源站未返回 Cache-Control 头时,缓存/不缓存开关。当 Switch 为 on 时,此字段必填,当 Switch 为 off 时,无需填写此字段,若填写则不生效。取值有:

  • DefaultCacheStrategy:

    源站未返回 Cache-Control 头时,使用/不使用默认缓存策略开关。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheTime 不为 0 时,此字段必须为 off。取值有:

  • DefaultCacheTime:

    源站未返回 Cache-Control 头时,表示默认的缓存时间,单位为秒,取值:0-315360000。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheStrategy 为 on 时, 此字段必须为 0。



13018
13019
13020
# File 'lib/v20220901/models.rb', line 13018

def DefaultCacheTime
  @DefaultCacheTime
end

#SwitchObject

<li>on:开启;</li> <li>off:关闭。</li> <li>on:缓存;</li> <li>off:不缓存。</li> <li>on:使用默认缓存策略;</li> <li>off:不使用默认缓存策略。</li>

Parameters:

  • Switch:

    遵循源站配置开关,取值有:

  • DefaultCache:

    源站未返回 Cache-Control 头时,缓存/不缓存开关。当 Switch 为 on 时,此字段必填,当 Switch 为 off 时,无需填写此字段,若填写则不生效。取值有:

  • DefaultCacheStrategy:

    源站未返回 Cache-Control 头时,使用/不使用默认缓存策略开关。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheTime 不为 0 时,此字段必须为 off。取值有:

  • DefaultCacheTime:

    源站未返回 Cache-Control 头时,表示默认的缓存时间,单位为秒,取值:0-315360000。当 DefaultCache 为 on 时,此字段必填,否则此字段不生效;当 DefaultCacheStrategy 为 on 时, 此字段必须为 0。



13018
13019
13020
# File 'lib/v20220901/models.rb', line 13018

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



13027
13028
13029
13030
13031
13032
# File 'lib/v20220901/models.rb', line 13027

def deserialize(params)
  @Switch = params['Switch']
  @DefaultCache = params['DefaultCache']
  @DefaultCacheStrategy = params['DefaultCacheStrategy']
  @DefaultCacheTime = params['DefaultCacheTime']
end