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

[Doc] Cache docs please #4

Closed
ac1982 opened this issue Jun 9, 2020 · 1 comment
Closed

[Doc] Cache docs please #4

ac1982 opened this issue Jun 9, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@ac1982
Copy link

ac1982 commented Jun 9, 2020

Woule you please add an example for cache instance?
thanks.

@Reasno Reasno added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jun 18, 2020
@Reasno
Copy link
Member

Reasno commented Jul 14, 2020

Annotations are no-go, so the option left is to use PSR-16 simple cache (supported by hyperf/cache).

$app->get('/{key}', function(\Psr\SimpleCache\CacheInterface $cache, $key){
	return $cache->get($key, 'default');	
})

···

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants