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

Add cache support #742

Closed
dkarlovi opened this issue Mar 9, 2023 · 4 comments
Closed

Add cache support #742

dkarlovi opened this issue Mar 9, 2023 · 4 comments

Comments

@dkarlovi
Copy link

dkarlovi commented Mar 9, 2023

Much like Github has.

https://github.com/KnpLabs/php-github-api#cache-usage

@GrahamCampbell
Copy link
Member

We already have cache support. It works in the same way.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Mar 9, 2023

Well, almost the same way. We don't expose it on the client class itself. You have to pass an http client builder into the constructor of the client, having added the cache plugin to it.

@GrahamCampbell
Copy link
Member

$builder = new Gitlab\HttpClient\Builder();
$builder->addCache($cache);
$client = new Gitlab\Client($builder);

@dkarlovi
Copy link
Author

dkarlovi commented Mar 9, 2023

Ah, should have checked myself, sorry for the churn and thanks for the reply!

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

No branches or pull requests

2 participants