Commit f7836a34 authored by Romain Thouvenin's avatar Romain Thouvenin
Browse files

API function to init / reload full cache

parent 1d6626d7
use CRM_Traxivi_ExtensionUtil as E;
* Store all available trackable URLs in the Traxy cache
function civicrm_api3_traxy_Reloadcache($params) {
$url = new CRM_Mailing_DAO_TrackableURL();
if ($url->find(FALSE)) {
$cache = Civi::cache('traxy');
while ($url->fetch()) {
$cache->set("URL:{$url->id}", $url->url);
return civicrm_api3_create_success(['count' => $url->N], $params, 'Traxy', 'Reloadcache');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment