0

i wrote a little sh*tcode that loads data from one accounting program in xml format, parses it and adds it to the database, but there is one big problem: the data is displayed on the page itself in CRM, you need to reload the page 2 times, when you first restart the page, the system turns to the cache, and when the second update actually goes to the database, I need somehow using php or js make it so that it does not access the cache, but access the database

P.S. Version vTigerCRM 7.1 module Products

Raite
  • 5
  • 1
  • 3

1 Answers1

0

There are three solution, A) Make dynamic content in your code B) Clear Smarty Cache in your code C) Disable caching in vTiger

If option A works, it is most effective

one is to put a little footer or header in your code that changes the content to let smarty clear cache itself( for example put Date() or a number.

Second solution is to look for SMARTY to clear cache:

// clear the entire cache
$smarty->clearAllCache();

// clears all files over one hour old
$smarty->clearAllCache(3600);

Third Look for PS_SMARTY_CACHE under Table prefix_configuration and set it to 0

Mason.Chase
  • 897
  • 1
  • 10
  • 21
  • Thank you for the answer Mason, I'll definitely try your options and write you the result – Raite Jan 15 '19 at 11:44
  • Where should I put the code for $smarty->clearAllCache(); - Which table in vtiger we should update PS_SMARTY_CACHE? as there is no table called prefix_configuration – Amit Shah May 06 '19 at 14:09