Samples: add a small fix to purge cache when settings change.