cache

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CACHE_ARCHIVE_DATA_FILE_SUFFIX = ".data"

缓存归档数据文件后缀

View Source
var CACHE_ARCHIVE_INDEX_FILE_SUFFIX = ".index"

缓存归档索引文件后缀

View Source
var CACHE_FILE_PREFIX = "dis-cache-data-"
View Source
var CACHE_TMP_FILE_SUFFIX = ".tmp"

缓存临时文件后缀

View Source
var DEFAULT_THREAD_POOL_SIZE = 100
View Source
var MB int64 = 1024 * 1024
View Source
var PROPERTY_DATA_CACHE_ARCHIVE_LIFE_CYCLE int64
View Source
var PROPERTY_DATA_CACHE_ARCHIVE_MAX_SIZE int64
View Source
var PROPERTY_DATA_CACHE_DIR string
View Source
var PROPERTY_DATA_CACHE_DISK_MAX_SIZE int64

Functions

func PutDataToCache

func PutDataToCache(putRecordsRequest *models.PutRecordsRequest)

func PutToCache

func PutToCache(putRecordsRequest *models.PutRecordsRequest, cacheResendConf *models.CacheResendConf)

func WriteToFile

func WriteToFile(data string) error

*

  • 写入缓存文件
  • @param data 待写入缓存文件的数据

Types

type CacheManager

type CacheManager struct {
	DataTmpFileName   string
	TmpFileCreateTime int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL