Skip to content

What's the difference of time duration between persist and cache? #31

Description

@rts-gordon

Hi there
There are two time duration of gin-cache: persist.NewMemoryStore(), cache.CacheByRequestURI, what's the difference between them?
Can they merge into one time duration?

memoryStore := persist.NewMemoryStore(1 * time.Minute)
	app.GET("/hello",
		cache.CacheByRequestURI(memoryStore, 2*time.Second),
		func(c *gin.Context) {
			c.String(200, "hello world")
		},
	)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions