- Timestamp:
- 11/27/08 21:04:13 (6 weeks ago)
- Location:
- plugins/staticcache/trunk
- Files:
-
- 2 modified
-
dash_module_staticcache.php (modified) (1 diff)
-
staticcache.plugin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/staticcache/trunk/dash_module_staticcache.php
r1269 r1369 27 27 spinner.stop(); 28 28 humanMsg.displayMsg( json ); 29 $('.static-cache-module .item .pct20').each(function() { 30 $(this).html('0'); 31 }); 29 32 }, 30 33 'json' -
plugins/staticcache/trunk/staticcache.plugin.php
r1269 r1369 23 23 'action_init' => 1 24 24 ); 25 } 26 27 public function alias() 28 { 29 return array( 30 'action_post_update_after' => array( 31 'action_post_insert_after', 32 'action_post_delete_after' 33 ), 34 'action_comment_update_after' => array( 35 'action_comment_insert_after', 36 'action_comment_delete_after' 37 ) 38 ); 25 39 } 26 40 … … 108 122 Cache::expire( array('staticcache', $name) ); 109 123 } 124 Options::set('staticcache__hits', 0); 125 Options::set('staticcache__misses', 0); 126 Options::set('staticcache__average_time', 0); 110 127 echo json_encode("Cleared Static Cache's cache"); 111 128 } 112 129 113 public function cache_invalidate( $urls )130 public function cache_invalidate( array $urls ) 114 131 { 115 132 // account for annonymous user (id=0) … … 127 144 } 128 145 129 public function action_post_insert_after( $post ) 130 { 131 $this->action_post_update_after( $post ); 132 } 133 134 public function action_post_delete_after( $post ) 135 { 136 $this->action_post_update_after( $post ); 137 } 138 139 public function action_post_update_after( $post ) 146 public function action_post_update_after( Post $post ) 140 147 { 141 148 $urls = array( … … 148 155 } 149 156 150 public function action_comment_insert_after( $comment ) 151 { 152 $this->action_comment_update_after( $comment ); 153 } 154 155 public function action_comment_delete_after( $comment ) 156 { 157 $this->action_comment_update_after( $comment ); 158 } 159 160 public function action_comment_update_after( $comment ) 157 public function action_comment_update_after( Comment $comment ) 161 158 { 162 159 $urls = array(
