Configuring the plugin
Configuring the pluginOverriding the cache folder

Overriding the cache folder

Gato GraphQL will cache its internal configuration to improve performance.

The cache works by storing files to disk, under folder wp-content/plugins/graphql-api/cache.

We can define a new location for the cache folder, such as when:

  • We have removed writing permissions from under wp-content/plugins
  • We rather place it under a different location, such as wp-content/uploads

Defining the new folder

Indicate the full path to the new cache folder, via either (in order of priority):

  1. An environment variable CACHE_DIR
  2. Defining constant GATOGRAPHQL_CACHE_DIR in wp-config.php:
// File wp-config.php
define( 'GATOGRAPHQL_CACHE_DIR', '/path/to/cache' );