CFGP_SESSION

This constant manages the expiration time of the session that is set for each visitor individually. The session prevents repeated API calls by caching geolocation data for the defined time duration.

When the time expires, or when the visitor’s IP address changes, a new session is generated and a new API call is made.

Source

Defined in: /cf-geoplugin/constants.php

if (!defined('CFGP_SESSION')) {
    define('CFGP_SESSION', 30); // 30 minutes
}

How to change

You can override this value by setting it in your wp-config.php file before WordPress loads the plugin.

// Extend Geo Controller session timeout to 60 minutes
define('CFGP_SESSION', 60);

Note: Value is defined in minutes. Use whole integers only. Setting an excessively short timeout may cause frequent API calls and reduce performance.

Was this page helpful?