datacacheconfig¶
Pydantic DataCache Configuration Data Model.
        
DataCacheConfig            (BaseModel)
        
  
      pydantic-model
  
¶
    DataCache Configuration.
Source code in oteapi/models/datacacheconfig.py
          class DataCacheConfig(BaseModel):
    """DataCache Configuration."""
    cacheDir: Path = Field("oteapi", description="Cache directory.")
    accessKey: str = Field(
        None,
        description="Key with which the downloaded content can be accessed. "
        "Should preferable be the hash (corresponding to `hashType`) of the "
        "content if it is known.",
    )
    hashType: str = Field(
        "md5",
        description="Hash algorithm to use for creating hash keys for stored "
        "data. Can be any algorithm supported by hashlib.",
    )
    expireTime: int = Field(
        3600 * 24 * 14,
        description="Number of seconds before the cache entry expires. "
        "Zero means no expiration. Default is two weeks.",
    )
    tag: str = Field(
        None,
        description="Tag assigned to the downloaded content, typically "
        "identifying a session. Used with the `evict()` method to clean up a "
        "all cache entries with a given tag.",
    )
accessKey: str
  
      pydantic-field
  
¶
    Key with which the downloaded content can be accessed. Should preferable be the hash (corresponding to hashType) of the content if it is known.
cacheDir: Path
  
      pydantic-field
  
¶
    Cache directory.
expireTime: int
  
      pydantic-field
  
¶
    Number of seconds before the cache entry expires. Zero means no expiration. Default is two weeks.
hashType: str
  
      pydantic-field
  
¶
    Hash algorithm to use for creating hash keys for stored data. Can be any algorithm supported by hashlib.
tag: str
  
      pydantic-field
  
¶
    Tag assigned to the downloaded content, typically identifying a session. Used with the evict() method to clean up a all cache entries with a given tag.