Added glance cache cleaning and pruning

This a rebase of #521.