How to update a resourcemanager which gets data from a changeable database
<p>i wrote a resourcemanager which contains AssedtIDs, which are handles to the assets. For example for textures. </p>

<p>So something like that:</p>

<pre><code>class ResourceManager{

std::map&lt;std::string, AssetID&gt; images;

getAsset();
....
}
class AssetID{
std::string path;
getTexture();
}
</code></pre>

<p>Now if the picture in the database is changing while runtime, i want the new picture with the old assetid. 
I made an observerclass which warns me if the database changed. One solution which came into my mind was to iterate through all IDs and check if the link is broke. But than i thought about the usecase that the path is the same but the picture is different, but the old texture is already loaded.</p>

<p>Maybe someone knows an engine which has to handle this problem. Because my only idea is to decode all textures and check if they are the same as the old ones</p>