Skip to content

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

@rts-gordon

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")
		},
	)

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