obstschale Posted April 29, 2013 Share Posted April 29, 2013 I probably think somewhere in this forum my question is already answered, but I couldn't find it. :/ So I was wondering what all the different workflow data is for. All the great Libs (post link) are able to find the cache dir, data dir, bundle id and different stuff. But why do I need this? David mentioned Data Storage here but I don't really understand what the difference between these two dirs is. Can any one explain me why my workflow should know the bundle ID, the cache and data dir? Link to comment
Tyler Eich Posted April 29, 2013 Share Posted April 29, 2013 (edited) I probably think somewhere in this forum my question is already answered, but I couldn't find it. :/So I was wondering what all the different workflow data is for. All the great Libs (post link) are able to find the cache dir, data dir, bundle id and different stuff. But why do I need this?David mentioned Data Storage here but I don't really understand what the difference between these two dirs is. Can any one explain me why my workflow should know the bundle ID, the cache and data dir? The cache should be used for data that will not be needed very long. For example, in my Colors workflow, I use the cache to store the color preview images generated by my script; the files are for that moment, only saved for quick access, deletable, unnecessary, and can be made again.The data folder is for information that will be needed again and again. For example, user credentials (like the AppID in my Wolfram|Alpha workflow, passwords, usernames, etc.). They are necessary for functionality, and if deleted, need to be replaced manually. The workflow's actual path folder holds scripts, non-changing icons, and other core components of the workflow. These will be deleted and replaced if the workflow is updated, thus updating the components. Bundleid is used to identify your workflow. It is used as the name for your workflow's cache folder and data folder; workflows without bundleids cannot be safely updated. Hope this makes sense Edited April 29, 2013 by Tyler Eich obstschale 1 Link to comment
obstschale Posted April 29, 2013 Author Share Posted April 29, 2013 Thx Tyler, this is a great description and I think I finally got it Tyler Eich 1 Link to comment
jdfwarrior Posted April 29, 2013 Share Posted April 29, 2013 The cache should be used for data that will not be needed very long. For example, in my Colors workflow, I use the cache to store the color preview images generated by my script; the files are for that moment, only saved for quick access, deletable, unnecessary, and can be made again. The data folder is for information that will be needed again and again. For example, user credentials (like the AppID in my Wolfram|Alpha workflow, passwords, usernames, etc.). They are necessary for functionality, and if deleted, need to be replaced manually. The workflow's actual path folder holds scripts, non-changing icons, and other core components of the workflow. These will be deleted and replaced if the workflow is updated, thus updating the components. Bundleid is used to identify your workflow. It is used as the name for your workflow's cache folder and data folder; workflows without bundleids cannot be safely updated. Hope this makes sense Spot on. Thank you sir. Tyler Eich 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now