Skip to content

Instantly share code, notes, and snippets.

@jrenggli
Created April 14, 2015 08:53
Show Gist options
  • Save jrenggli/8d86886d1f822bb6847a to your computer and use it in GitHub Desktop.
Save jrenggli/8d86886d1f822bb6847a to your computer and use it in GitHub Desktop.
flush cache for ImageVariants in TYPO3 Neos / TYPO3 Flow. Delete all persistent files not managed in table typo3_flow_resource_resource. Use to regenerate all images with ImageMagick / Imagick
cd Data/Persistent/Resources
ls -1 | while read F; do
echo '-'
resourcepointer=$(echo "SELECT resourcepointer FROM typo3_flow_resource_resource WHERE resourcepointer = '${F}';" | mysql 'DBNAME' -u'DBUSER' -p'DBPASSWORD' -s)
if [ -z "${resourcepointer}" ]; then
rm ${F}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment