Detect an ongoing search via scripting

Is it possible to detect via scripting whether Opus is currently running a search? I don't mean detect being in a path like coll://Search Results, but if an actual search is currently active.

Why? To fine-tune the introduction of script columns with per-item caching. I've been experimenting with this and found that a good way to clear the cache is using timers and cache age. It can happen that the timer fires exactly while Opus is in the middle of a search and is using one of those cached columns, which could cause some items there to have their cache deleted. It's a bit of an edge case, but I wanted to know if this can be avoided by detecting an active search.