cachepoolutil

package module
v0.0.0-...-15815bd Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SequenceGet

func SequenceGet() string

* * 取时间显示式的流水号 * @return 返回形式举例:20200521094216048001

Types

type CachePool

type CachePool struct{}

自定义缓存池

func (CachePool) Add

func (cp CachePool) Add(cacheInfo *cacheInfo.CacheInfo) *msgentity.MsgEntity

* * 添加缓存 * @param cacheInfo * @return

func (CachePool) AddData

func (cp CachePool) AddData(sId string, data interface{}) *msgentity.MsgEntity

* * 添加缓存 * @param sId * @param oData * @return

func (CachePool) Clear

func (cp CachePool) Clear() *msgentity.MsgEntity

*

  • 清理缓存
  • @return

func (CachePool) Contains

func (cp CachePool) Contains(sId string) bool

* * 判断是否包含缓存,包含返回true * @param sId * @return

func (CachePool) Find

func (cp CachePool) Find(sId string) *cacheInfo.CacheInfo

* * 查找缓存信息 * @param sId * @return

func (CachePool) FindData

func (cp CachePool) FindData(sId string) interface{}

* * 查找缓存对象 * @param sId * @return

func (CachePool) Free

func (cp CachePool) Free(sId string) *msgentity.MsgEntity

* * 释放缓存 * @param sId * @return

func (CachePool) FreeByData

func (cp CachePool) FreeByData(data interface{}) *msgentity.MsgEntity

* * 释放缓存 * @param sId * @return

func (CachePool) FreeById

func (cp CachePool) FreeById(sId string) *msgentity.MsgEntity

* * 释放缓存 * @param sId * @return

func (CachePool) FreeByTime

func (cp CachePool) FreeByTime(iMinute int) *msgentity.MsgEntity

* * 释放指定分钟之前的缓存 * @param iMinute * @return

type CacheTxtUtil

type CacheTxtUtil struct{}

func (CacheTxtUtil) CreateCacheFile

func (ctu CacheTxtUtil) CreateCacheFile(object interface{}, sCacheFile string) *msgentity.MsgEntity

*

  • 创建缓存文件
  • @param object 待存储数据对象
  • @param sCacheFile 缓存文件路径及文件名
  • @return

func (CacheTxtUtil) CreateCacheFileByList

func (ctu CacheTxtUtil) CreateCacheFileByList(list []interface{}, sCacheFile string) *msgentity.MsgEntity

*

  • 创建缓存文件
  • @param list 数据集合
  • @param sCacheFile 缓存文件路径及文件名
  • @return

func (CacheTxtUtil) DelCacheFile

func (ctu CacheTxtUtil) DelCacheFile(sCacheFile string) *msgentity.MsgEntity

*

  • 删除缓存文件
  • @param sCacheFile

func (CacheTxtUtil) ReadCacheFile

func (ctu CacheTxtUtil) ReadCacheFile(sCacheFile ...string) []interface{}

*

  • 读取缓存文件
  • @param sCacheFile 缓存文件路径及文件名
  • @return

Jump to

Keyboard shortcuts

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