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

Can't setup cache #7

Open
PaulBouisset opened this issue Feb 19, 2021 · 0 comments
Open

Can't setup cache #7

PaulBouisset opened this issue Feb 19, 2021 · 0 comments

Comments

@PaulBouisset
Copy link

Hi, thanks for the plugin that what I was looking for but I have trouble to set it up.

I followed the readme and activated the plugin, then I put this code snippet in functions.php but nothing happens:

use WPGraphQL\Extensions\Cache\CacheManager;

CacheManager::register_graphql_query_cache([
    'query_name' => '*',
    'expire' => 120, // sec
]);

I also saw that if I run this it throws an error saying that CacheManager is null.

use WPGraphQL\Extensions\Cache\CacheManager;
CacheManager::clear()

Am I missing a step for the setup?

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