Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rts-gordon opened this issue Feb 11, 2023 · 0 comments
Open

Comments

@rts-gordon
Copy link
Contributor

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")
		},
	)
@rts-gordon rts-gordon changed the title What's the difference time duration between persist and cache? What's the difference of time duration between persist and cache? Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant