godbout / AlfredKat

the infamous alfred-kat but in Swift because macOS is getting rid of the PHP interpreter.
MIT License
32 stars 0 forks source link

AlfredKat not using the recommended location for the workflow cache #14

Closed xilopaint closed 2 years ago

xilopaint commented 2 years ago

The cache location should be implemented through the alfred_workflow_cache environment variable. See: https://www.alfredapp.com/help/workflows/script-environment-variables/

godbout commented 2 years ago

as far as i remember i'm not caching anything in Alfred Kat. did you see any place in the code that is overriding this?

xilopaint commented 2 years ago

The following is created by AlfredKat and is located at ~/Library/Caches/AlfredKat.

Screen Shot 2022-04-20 at 01 51 34

godbout commented 2 years ago

oh. this is just me snooping on all the porn downloaded through Alfred Kat so that i'm getting some inspiration.

ok, in real i guess it may then be the SwiftSoup library used to parse HTML that may do some caching then. will check, thanks. quite a feat you caught that.

godbout commented 2 years ago

yeah so the files in fsCachedData are downloaded pages. will check with SwiftSoup if there's a way to configure where this is cached. will keep you updated.

godbout commented 2 years ago

wait. there's more. so after a quick research i'm finding that it's Apple's URL (https://developer.apple.com/documentation/foundation/url#) that is caching by default. had no idea. very cool thanks, learning a bit more about Apple's APIs. will investigate more and hopefully a fix within this week.

godbout commented 2 years ago

done in v7.0.0: https://github.com/godbout/AlfredKat/releases/tag/7.0.0

if you were using 6.2.0, you should see the update show up in Alfred when using KAT. thanks for reporting! learned quite a bit.