Closed (fixed)
Project:
BACnet
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
11 Aug 2014 at 19:50 UTC
Updated:
25 Sep 2014 at 20:22 UTC
Jump to comment: Most recent
In bacnet_soap_get_value(), you are always setting cache_set and cache_get. I'd suggest doing cache_get first, and if it returns false, then run the query against the soap server to get the value, and caching that result. If cache_get returns false, use the request from the soap server, otherwise use the cached response.
Comments
Comment #1
dbt102 commentedComment #2
dbt102 commentedRunning cache_get first pulls in the last cached value if it is present. However, this module is intended to show a portion of the data history up to the NOW value. By setting the NOW value first by running the cache_set first, that NOW value will update the last cached NOW and therefore be most current.
This method is simple and effective so I would like to keep it this way for now. As the module matures, a more complex routine can be implemented based on user feedback.
Comment #3
dbt102 commentedComment #4
dbt102 commentedReopening this issue and marking it as postponed so that it can be further looked at as part of the broader phase 2 refactoring effort.
Comment #5
dbt102 commentedRevised use of bacnet_soap_get_value per comments https://www.drupal.org/node/2312955#comment-9043505 and https://www.drupal.org/node/2312955#comment-9160983
Comment #7
dbt102 commented