Clearing Cache

In the administrator there are these settings. They are used to clear the many caches in Lucee. I have listed some the code listed as you can do it yourself in code suggestions below.

I have 1 question and 1 comment.

Question: What is the best order if I want to include these routines in my reset app function?

Comment: Why are some of them in script and some in tag format?

script format
applicationPathCacheClear();
pagePoolClear();
componentCacheClear();

Tag format: I removed the front <
cfobjectcache type=“function” action=“clear”>
cfobjectcache type=“include” action=“clear”>
cfobjectcache type=“object” action=“clear”>
cfobjectcache type=“query” action=“clear”>
cfobjectcache type=“resource” action=“clear”>
cfobjectcache type=“template” action=“clear”>

Don’t use pagePoolClear(), please only use inspectTemplates() instead, it’s far more efficient

as per the cache category in docs, there is an equivalent function to clear the cache

as for the order, it really doesn’t matter as all these operations are extremely fast

2 Likes

thanks