diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 00:45:00 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-28 00:45:00 -0700 |
commit | 8d2782ad1df10679b302ab6c4fafdd2f5535be4a (patch) | |
tree | 6f3e44645209471aede760e79a5c7b1836fdba8b | |
parent | ebb0761b8dd10e804c017e8a0d25413796916d72 (diff) |
Flush the model cache as appropriate every time we call ORM::save().
Fixes ticket #301
-rw-r--r-- | modules/gallery/libraries/MY_ORM.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/libraries/MY_ORM.php b/modules/gallery/libraries/MY_ORM.php index fb2f80a7..2bd9b4eb 100644 --- a/modules/gallery/libraries/MY_ORM.php +++ b/modules/gallery/libraries/MY_ORM.php @@ -27,6 +27,11 @@ class ORM extends ORM_Core { $this->db->close_paren(); return $this; } + + public function save() { + model_cache::clear($this->object_name, $this->{$this->primary_key}, $this->primary_key); + return parent::save(); + } } /** |