Hello,
I’m building a custom dashboard.
I am using modeles.
Inside the modeles, I am calling a PHP function, that fetches some information from the DB.
When I enable SPIP’s cache, the load time is fantastic, but the dynamic PHP function is not working. Stale content is returned.
I would like to either have parts of the code/modele not be cached, or force a refresh on the cache in certain conditions (db modifications).
Is there a way to use dynamic php functions in modeles with the cache enabled?
I would like to understand better how the caching in SPIP is working, and how dynamic content could be handled. I guess one answer would be, to implement everything using BOUCLES. For now I have PHP functions that prepare content using sql_allfetsel.
Otherwise, if there is no way to run these functions with the change, I can also disable the cache:
<?php
// ne jamais utiliser le cache
// ni meme creer les fichiers cache
define('_NO_CACHE', -1);
FYI, using #CACHE{0} on modeles and sub-modeles has not worked.
Best regards