@@ -87,13 +87,12 @@ public class BSqlFileManager {
8787 */
8888 public String select (final String app , final String table , final String key ) throws OperationException {
8989 String result = null ;
90- if (LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table )) {
90+ if (app . equals ( ".systemdb" ) || ( LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table ) )) {
9191 result = dataCache .load (app , table , key );
9292 if (result != null ) {
9393 return result ;
9494 }
9595 }
96-
9796 transactionLocking .acquireLock (app , table , key , LockType .READ );
9897 try {
9998 Path path = Paths .get (PathUtil .dataFile (app , table , key ));
@@ -332,7 +331,7 @@ public void save(final String app, final String table, final String key, final S
332331 Path path = Paths .get (PathUtil .dataFile (app , table , key ));
333332 try {
334333 Files .write (path , jsonString .getBytes ("UTF-8" ));
335- if (LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table )) {
334+ if (app . equals ( ".systemdb" ) || ( LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table ) )) {
336335 dataCache .cache (app , table , key , jsonString );
337336 }
338337 } catch (IOException ex ) {
@@ -354,7 +353,7 @@ public void insert(final String app, final String table, final String key, final
354353 }
355354 try {
356355 Files .write (path , jsonString .getBytes ("UTF-8" ));
357- if (LicenseRules .DATA_CACHING && LicenseRules .CACHE_INSERTS && cacheRules .shouldCache (app , table )) {
356+ if (app . equals ( ".systemdb" ) || ( LicenseRules .DATA_CACHING && LicenseRules .CACHE_INSERTS && cacheRules .shouldCache (app , table ) )) {
358357 dataCache .cache (app , table , key , jsonString );
359358 }
360359 } catch (IOException ex ) {
@@ -380,7 +379,7 @@ public boolean rename(final String app, final String table, final String existin
380379 if (file .renameTo (newFile )) {
381380
382381 /* Update cache */
383- if (LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table )) {
382+ if (app . equals ( ".systemdb" ) || ( LicenseRules .DATA_CACHING && cacheRules .shouldCache (app , table ) )) {
384383 String cachedValue = dataCache .load (app , table , existingKey );
385384 dataCache .invalidate (app , table , existingKey );
386385 dataCache .cache (app , table , newKey , cachedValue );
0 commit comments