We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Asset caching

Hello,

Can you explain how an asset collection works when we use the setTargetPath ?

What i'd like the system to do when i create an asset is to be able to provide a TTL (8h / 24h / 10d).

if the TTL is not attained, nothing is done and none of the assets are read. when the ttl is finished, everything is done as now and the file is rewritten.

As we only have file, we could use the creation date of the file as the TTL, creation date can be forced in the future to now() + TTL, so if creation date > now() => don't do anything, if not, revalidate the file and change the creation date to now()+TTL.

What do you think of this evolution ?