Jump to content

5.5: caching script filters automatically


Stephen_C

Recommended Posts

This Alfred help page states:

Quote

Caches are marked as stale - and thus purged, causing the script to rerun when called - by:

  • Editing the Script Filter object.
  • Clicking Flush in the debugger.
  • Reloading the workflow.

 

The second certainly works for me but I'm not sure that the first does. When I edit a script filter that includes caching I still need to click Flush in the debugger in order to see the changes. It may be a misunderstanding on my part as to what constitutes "Editing”—but I've certainly made additions to or deletions from the script filter when I'm not seeing the changes, when running the filter, without clicking Flush.

 

Edit: I wonder whether it's because the script I'm editing is in the workflow folder. 🤔

 

Stephen

Edited by Stephen_C
Further thought
Link to comment
Share on other sites

2 hours ago, Stephen_C said:

Edit: I wonder whether it's because the script I'm editing is in the workflow folder.

 

Hey Stephen,

 

If you're editing a separate script (not the Script Filter Object), then the cache is working as intended... i.e. caching until you asked it to expire. If you open the Script Filter Object Config, then select Save, you should see a message in the debugger that the cache has been flushed.

 

Let me know if this isn't the case and I'll take a deeper look.

 

Cheers,

Andrew

Link to comment
Share on other sites

4 minutes ago, Andrew said:

If you open the Script Filter Object Config, then select Save, you should see a message in the debugger that the cache has been flushed.

Andrew, of course it's working exactly as intended. 😀

 

Stephen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...