dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24679
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12141: Setting 'cache until 6am next morning' as default cache strategy, too many who not realize this s...
------------------------------------------------------------
revno: 12141
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-18 14:45:52 +0200
message:
Setting 'cache until 6am next morning' as default cache strategy, too many who not realize this setting is important
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2013-09-18 12:45:52 +0000
@@ -78,12 +78,11 @@
final String KEY_MULTI_ORGANISATION_UNIT_FORMS = "multiOrganisationUnitForms";
final String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASKS = "scheduleAggregateQueryBuilder";
final String KEY_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "scheduleAggregateQueryBuilderTackStrategy";
+ final String KEY_CONFIGURATION = "keyConfig";
+ final String KEY_ACCOUNT_RECOVERY = "keyAccountRecovery";
+
final String DEFAULT_SCHEDULE_AGGREGATE_QUERY_BUILDER_TASK_STRATEGY = "lastMonth";
final String DEFAULT_FLAG = "dhis2";
-
- final String KEY_CONFIGURATION = "keyConfig";
- final String KEY_ACCOUNT_RECOVERY = "keyAccountRecovery";
-
final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20;
final int DEFAULT_TIMEFRAME_MINUTES = 1;
final double DEFAULT_FACTOR_OF_DEVIATION = 2.0;
@@ -91,10 +90,10 @@
final String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w";
final String DEFAULT_START_MODULE = "dhis-web-dashboard-integration";
final String DEFAULT_APPLICATION_TITLE = "District Health Information Software 2";
- final int DEFAULT_EMAIL_PORT = 587;
-
+ final int DEFAULT_EMAIL_PORT = 587;
final int DEFAULT_COMPLETENESS_OFFSET = 15;
- final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00";
+ final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00";
+ final String DEFAULT_CACHE_STRATEGY = "CACHE_6AM_TOMORROW";
final String SYSPROP_PORTAL = "runningAsPortal";
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2013-08-23 16:00:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2013-09-18 12:45:52 +0000
@@ -51,6 +51,7 @@
import static org.apache.commons.lang.StringUtils.trimToNull;
import static org.hisp.dhis.setting.SystemSettingManager.KEY_CACHE_STRATEGY;
+import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_CACHE_STRATEGY;
/**
* @author Lars Helge Overland
@@ -105,7 +106,7 @@
if ( cacheStrategy.equals( CacheStrategy.RESPECT_SYSTEM_SETTING ) )
{
- String strategy = trimToNull( (String) systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY ) );
+ String strategy = trimToNull( (String) systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY, DEFAULT_CACHE_STRATEGY ) );
cacheStrategy = strategy != null ? CacheStrategy.valueOf( strategy ) : CacheStrategy.NO_CACHE;
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2013-09-18 12:45:52 +0000
@@ -82,7 +82,7 @@
{
Map<String, Object> map = new HashMap<String, Object>();
- map.put( KEY_CACHE_STRATEGY, systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY ) );
+ map.put( KEY_CACHE_STRATEGY, systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY, DEFAULT_CACHE_STRATEGY ) );
map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE, DEFAULT_APPLICATION_TITLE ) );
map.put( KEY_APPLICATION_INTRO, systemSettingManager.getSystemSetting( KEY_APPLICATION_INTRO ) );
map.put( KEY_APPLICATION_NOTIFICATION, systemSettingManager.getSystemSetting( KEY_APPLICATION_NOTIFICATION ) );