FIRE-905: Force cache clear when ever J2C engine changes
parent
9f6ddff6f7
commit
15576979a0
|
|
@ -13541,5 +13541,16 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LastJ2CVersion</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Last used J2C engine version</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -3475,6 +3475,14 @@ bool LLAppViewer::initCache()
|
|||
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false);
|
||||
mPurgeCache = true;
|
||||
}
|
||||
|
||||
// If the J2C has changed since the last run, clear the cache
|
||||
const std::string j2c_info = LLImageJ2C::getEngineInfo();
|
||||
if (j2c_info != gSavedSettings.getString("LastJ2CVersion"))
|
||||
{
|
||||
mPurgeCache = true;
|
||||
}
|
||||
gSavedSettings.setString("LastJ2CVersion", j2c_info);
|
||||
|
||||
// We have moved the location of the cache directory over time.
|
||||
migrateCacheDirectory();
|
||||
|
|
|
|||
Loading…
Reference in New Issue