Skip to content

Commit e9573e1

Browse files
committed
Added stash_prune hooks
1 parent 137723e commit e9573e1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##Stash
22

3-
![Release](https://img.shields.io/badge/release-2.6.8-brightgreen.svg)
3+
![Release](https://img.shields.io/badge/release-2.6.9-brightgreen.svg)
44

55
This is the development version of Stash. Test thoroughly before using in production.
66

system/expressionengine/third_party/stash/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if (! defined('STASH_VER'))
33
{
44
define('STASH_NAME', 'Stash');
5-
define('STASH_VER', '2.6.7');
5+
define('STASH_VER', '2.6.9');
66
define('STASH_AUTHOR', 'Mark Croxton');
77
define('STASH_DOCS', 'http://github.com/croxton/Stash/');
88
define('STASH_DESC', 'Stash: save text and code snippets for reuse throughout your templates.');

system/expressionengine/third_party/stash/models/stash_model.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,14 @@ function prune_keys()
531531
'expire !=' => '0'
532532
));
533533

534+
// -------------------------------------
535+
// 'stash_prune' hook
536+
// -------------------------------------
537+
if ($this->EE->extensions->active_hook('stash_prune') === TRUE)
538+
{
539+
$this->EE->extensions->call('stash_prune', $query->result_array());
540+
}
541+
534542
if ($query->num_rows() > 0)
535543
{
536544
if ($deleted = $this->delete_cache($query->result(), TRUE, 0, FALSE))

0 commit comments

Comments
 (0)