twilio/OpenVBX — Issue #188: Cache Bug
Author: tjlytle
Created: 2012-01-07 21:39:21+00:00
State: open

Seems that the caching in `MY_Model` pulls back the wrong data. If I request the same key from `PluginData::get()`, I sometimes get the last fetched data, not the data matching the key:

Setting `MY_Model::caching` to `false` fixes it. I'll see if I can find what's up and submit a pull request.

Some debug code:

[07-Jan-2012 21:37:47 UTC] search options
[07-Jan-2012 21:37:47 UTC] array (
'key' => 'queues',
'plugin_id' => 'PL422849719323d68eec45913eddf0f976',
)
[07-Jan-2012 21:37:47 UTC] values
[07-Jan-2012 21:37:47 UTC] VBX_Plugin_Store::__set_state(array(
'table' => 'plugin_store',
'error_prefix' => '',
'error_suffix' => '',
'fields' =>
array (
0 => 'key',
1 => 'value',
2 => 'plugin_id',
),
'natural_keys' =>
array (
0 => 'key',
1 => 'plugin_id',
),
'values' =>
array (
'key' => 'queues',
'value' => '["Support (Level 1)","Sales"]',
'plugin_id' => 'PL422849719323d68eec45913eddf0f976',
'tenant_id' => '1',
),
'admin_fields' =>
array (
),
'_parent_name' => 'VBX_Plugin_Store',
'tenant_id' => '1',
))
[07-Jan-2012 21:37:47 UTC] search options
[07-Jan-2012 21:37:47 UTC] array (
'key' => '1.report',
'plugin_id' => 'PL422849719323d68eec45913eddf0f976',
)
[07-Jan-2012 21:37:47 UTC] values
[07-Jan-2012 21:37:47 UTC] VBX_Plugin_Store::__set_state(array(
'table' => 'plugin_store',
'error_prefix' => '',
'error_suffix' => '',
'fields' =>
array (
0 => 'key',
1 => 'value',
2 => 'plugin_id',
),
'natural_keys' =>
array (
0 => 'key',
1 => 'plugin_id',
),
'values' =>
array (
'key' => 'queues',
'value' => '["Support (Level 1)","Sales"]',
'plugin_id' => 'PL422849719323d68eec45913eddf0f976',
'tenant_id' => '1',
),
'admin_fields' =>
array (
),
'_parent_name' => 'VBX_Plugin_Store',
'tenant_id' => '1',
))