Billhighway Cloud API

<back to all web services

CacheClearRq

The following routes are available for this service:
DELETE/devops/api/caches/{location}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BH.CloudAPI.DTO.Caching.Api.Request;
using BH.CloudAPI.DTO.Caching.Api.Response;
using BH.Caching;

namespace BH.Caching
{
    public partial class CacheClearResult
        : CacheResultBase
    {
        public virtual bool IsCleared { get; set; }
    }

    public partial class CacheKey
    {
        public virtual string Region { get; set; }
        public virtual string BaseKey { get; set; }
        public virtual string Key { get; set; }
        public virtual int ExpirationSeconds { get; set; }
    }

    public enum CacheLocation
    {
        None = 0,
        OutOfProcess = 1,
        InProcess = 2,
        InContext = 3,
    }

    [Flags]
    public enum CacheResult
    {
        None = 0,
        Miss = 1,
        Hit = 2,
        Put = 4,
        Deleted = 8,
        Cleared = 16,
        Added = 32,
        Updated = 64,
        Unavailable = 128,
        Expired = 256,
    }

    public partial class CacheResultBase
    {
        public virtual CacheResult Result { get; set; }
        public virtual CacheLocation Location { get; set; }
        public virtual CacheKey Key { get; set; }
    }

    public partial class CacheStat
    {
        public virtual string Name { get; set; }
        public virtual string Value { get; set; }
    }

    public partial class CacheStatResult
        : CacheResultBase
    {
        public CacheStatResult()
        {
            Statistics = new List<CacheStat>{};
        }

        public virtual List<CacheStat> Statistics { get; set; }
        public virtual bool IsHit { get; set; }
    }

}

namespace BH.CloudAPI.DTO.Caching.Api.Request
{
    public partial class CacheClearRq
    {
        public virtual string location { get; set; }
    }

}

namespace BH.CloudAPI.DTO.Caching.Api.Response
{
    public partial class CacheClearRs
    {
        public virtual CacheClearResult Result { get; set; }
        public virtual CacheStatResult BeforeStatistics { get; set; }
        public virtual CacheStatResult AfterStatistics { get; set; }
    }

}

C# CacheClearRq DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CacheClearRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.Caching.Api.Response">
  <AfterStatistics xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
    <d2p1:Key i:nil="true" />
    <d2p1:Location>None</d2p1:Location>
    <d2p1:Result>None</d2p1:Result>
    <d2p1:Statistics>
      <d2p1:CacheStat>
        <d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
        <d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
      </d2p1:CacheStat>
    </d2p1:Statistics>
  </AfterStatistics>
  <BeforeStatistics xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
    <d2p1:Key i:nil="true" />
    <d2p1:Location>None</d2p1:Location>
    <d2p1:Result>None</d2p1:Result>
    <d2p1:Statistics>
      <d2p1:CacheStat>
        <d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
        <d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
      </d2p1:CacheStat>
    </d2p1:Statistics>
  </BeforeStatistics>
  <Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
    <d2p1:Key i:nil="true" />
    <d2p1:Location>None</d2p1:Location>
    <d2p1:Result>None</d2p1:Result>
  </Result>
</CacheClearRs>