Regenerate patch files on cache clear
- If the patch doesn't exist we generate it.
- If the core file is updated we regenerate it.
- If the extension that requires patchwork is updated we don't regenerate patches.
This "fixes" 3 so that a cache clear in CiviCRM will force regeneration of patch files. This is useful because it ensures that the client site is using the latest version of patched files if you issue them with an updated extension as they are usually familiar with "clearing caches". The alternative is to ask them to manually delete the contents of the patchwork directory which may or may not be easy...