Making the app cache version available in a static file
- Split the version config option into version (for prod) and devVersion (for dev) so that devs can put their prod version into source control and not have to manually remove it every time
- The app cache is no longer enabled by default in prod; a version config option must be specified
- Added support for $brjsVersion and $timestamp variables in the appcache.conf file, so that you can generate unique versions automatically on every export.
General code cleanup and bug fixes
- Large changes to how the app cache is versioned internally to clean up the code and better support disabled states.
- Whether the app cache was previously enabled in dev is now persisted between restarts, which should fix issues with the app cache not clearing properly if it was disabled while brjs was shutdown
Adding a new content plugin to add the current app cache version to a $BRJS_APPCACHE_VERISON property in the javascript bundle, so that it can be easily referenced inside javascript files.
The BRJS_APPCACHE_VERSION property now appears before the other BRJS app metadata variables in the bundle, and is saved to the window object. Optimising imports.
Some comments and imports cleanup
The app cache tag is now always populated in dev.
If app cache is disabled, the tag will be 'appcache-disabled' which returns a 404. This is because the previous method of returning a 404 the first time and an empty tag on successive requests was unreliable when connecting from multiple machines.
Imports cleanup
Updating tag handler tests for the change to always use appcache-disabled in dev
Adding tests for the app cache version content plugin
Updating the readme with the latest changes