diff options
author | Simon Holywell <[email protected]> | 2018-01-03 17:14:25 +1000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2018-01-03 17:14:25 +1000 |
commit | 5f220f371dc250b1c65dfb5f767ebc8b8b40a92d (patch) | |
tree | c586545a9ce6e85522e96f4936b98d6986333193 /idiorm.php | |
parent | 16a53cddf06739c910d7899684370442daa01a4c (diff) |
Closes #319 - no reset on cached response
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1899,6 +1899,7 @@ $cached_result = self::_check_query_cache($cache_key, $this->_table_name, $this->_connection_name); if ($cached_result !== false) { + $this->_reset_idiorm_state(); return $cached_result; } } @@ -1915,12 +1916,17 @@ self::_cache_query_result($cache_key, $rows, $this->_table_name, $this->_connection_name); } - // reset Idiorm after executing the query + $this->_reset_idiorm_state(); + return $rows; + } + + /** + * Reset the Idiorm instance state + */ + private function _reset_idiorm_state() { $this->_values = array(); $this->_result_columns = array('*'); $this->_using_default_result_columns = true; - - return $rows; } /** |