Billhighway Cloud API

<back to all web services

CacheClearRq

The following routes are available for this service:
DELETE/devops/api/caches/{location}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @Flags()
class CacheResult(IntEnum):
    NONE = 0
    MISS = 1
    HIT = 2
    PUT = 4
    DELETED = 8
    CLEARED = 16
    ADDED = 32
    UPDATED = 64
    UNAVAILABLE = 128
    EXPIRED = 256


class CacheLocation(IntEnum):
    NONE = 0
    OUT_OF_PROCESS = 1
    IN_PROCESS = 2
    IN_CONTEXT = 3


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheKey:
    region: Optional[str] = None
    base_key: Optional[str] = None
    key: Optional[str] = None
    expiration_seconds: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheResultBase:
    result: Optional[CacheResult] = None
    location: Optional[CacheLocation] = None
    key: Optional[CacheKey] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheClearResult(CacheResultBase):
    is_cleared: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStat:
    name: Optional[str] = None
    value: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStatResult(CacheResultBase):
    statistics: Optional[List[CacheStat]] = None
    is_hit: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheClearRs:
    result: Optional[CacheClearResult] = None
    before_statistics: Optional[CacheStatResult] = None
    after_statistics: Optional[CacheStatResult] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheClearRq:
    location: Optional[str] = None

Python CacheClearRq DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /devops/api/caches/{location} HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Result: 
	{
		IsCleared: False,
		Result: 0,
		Location: 0
	},
	BeforeStatistics: 
	{
		Statistics: 
		[
			{
				Name: String,
				Value: String
			}
		],
		IsHit: False,
		Result: 0,
		Location: 0
	},
	AfterStatistics: 
	{
		Statistics: 
		[
			{
				Name: String,
				Value: String
			}
		],
		IsHit: False,
		Result: 0,
		Location: 0
	}
}