gf: github.com/gogf/gf/g/os/gfcache Index | Files

package gfcache

import "github.com/gogf/gf/g/os/gfcache"

Package gfcache provides reading and caching for file contents.

Index

Package Files

gfcache.go

func GetBinContents Uses

func GetBinContents(path string, duration ...interface{}) []byte

GetBinContents returns []byte content of given file by <path> from cache. If there's no content in the cache, it will read it from disk file specified by <path>. The parameter <expire> specifies the caching time for this file content in seconds.

func GetContents Uses

func GetContents(path string, duration ...interface{}) string

GetContents returns string content of given file by <path> from cache. If there's no content in the cache, it will read it from disk file specified by <path>. The parameter <expire> specifies the caching time for this file content in seconds.

Package gfcache imports 5 packages (graph) and is imported by 6 packages. Updated 2019-07-16. Refresh now. Tools for package owners.