Example #1
0
func myCacheReadHandler(ctx *macaron.Context, c cache.Cache) interface{} {
	val := c.Get(ctx.Params(":key"))
	if val != nil {
		return val
	} else {
		return fmt.Sprintf("no cache with \"%s\" set", ctx.Params(":key"))
	}
}