Fix render cache clearing deleting the database instead of removing the cache data
This commit is contained in:
+3
-13
@@ -317,21 +317,11 @@ public class RenderSourceFileHandler implements IRenderSourceProvider
|
||||
|
||||
public void deleteRenderCache()
|
||||
{
|
||||
// delete each file in the cache directory
|
||||
File[] renderFiles = this.saveDir.listFiles();
|
||||
if (renderFiles != null)
|
||||
{
|
||||
for (File renderFile : renderFiles)
|
||||
{
|
||||
if (!renderFile.delete())
|
||||
{
|
||||
LOGGER.warn("Unable to delete render file: " + renderFile.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// clear the cached files
|
||||
this.loadedMetaFileBySectionPos.clear();
|
||||
|
||||
// delete the render cache
|
||||
this.renderDataRepo.deleteAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -155,6 +155,9 @@ public abstract class AbstractDhRepo<TDTO extends IBaseDTO>
|
||||
this.queryDictionaryFirst("DELETE FROM "+this.getTableName()+" WHERE "+whereEqualStatement);
|
||||
}
|
||||
|
||||
/** With great power comes great responsibility... */
|
||||
public void deleteAll() { this.queryDictionaryFirst("DELETE FROM "+this.getTableName()); }
|
||||
|
||||
|
||||
public boolean exists(TDTO dto) { return this.existsWithPrimaryKey(dto.getPrimaryKeyString()); }
|
||||
public boolean existsWithPrimaryKey(String primaryKey)
|
||||
|
||||
Reference in New Issue
Block a user