Add a way to set/reset an image to/from the cache.
Write the local copy status into the database.
Display the local status into the metadata module.
Add a white circle on the image box in the ligttable area for local copies.

This is a simple marker to see what are the images having local copy
or not.
Allow creation of xmp sidecar for local copies.

So, remove sidecar when the local copy is reset.

This is for safety purpose in case the database got corrupted.
Refuse to remove a picture when a modified local copy exists.

This check is done when the original picture is not available otherwise
we could loose editing done on the local copy.