func (t *CacherSuite) TestSet(ch *C) { opts := cacher.Options{} opts.Engine = cacher.LOCALCACHE cacher.InitCache(opts) cacher.Set("a", []byte("b")) }
func (t *CacherSuite) TestGet(ch *C) { opts := cacher.Options{} opts.Engine = cacher.LOCALCACHE cacher.InitCache(opts) cacher.Set("c", []byte("d")) a := cacher.Get("c") ch.Assert(string(a), Equals, "d") }
func (t *CacherSuite) TestDelete(ch *C) { opts := cacher.Options{} opts.Engine = cacher.LOCALCACHE cacher.InitCache(opts) cacher.Set("e", []byte("f")) cacher.Delete("e") a := cacher.Get("e") ch.Assert(len(a), Equals, 0) }
func (t *CacherSuite) TestInit(ch *C) { opts := cacher.Options{} opts.Engine = cacher.LOCALCACHE cacher.InitCache(opts) }