code-snippets 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/code-snippets.rb +8 -3
- metadata +1 -1
data/lib/code-snippets.rb
CHANGED
@@ -65,7 +65,7 @@ class CodeSnippets
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def update(id ,h)
|
68
|
-
|
68
|
+
cache_reset
|
69
69
|
# fetch the user
|
70
70
|
user = h[:user]
|
71
71
|
h.delete :user
|
@@ -79,13 +79,13 @@ class CodeSnippets
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def create_entry(h)
|
82
|
-
|
82
|
+
cache_reset
|
83
83
|
user = h[:user]
|
84
84
|
@blog.create_entry(h, user)
|
85
85
|
end
|
86
86
|
|
87
87
|
def delete(id)
|
88
|
-
|
88
|
+
cache_reset
|
89
89
|
@blog.delete(id)
|
90
90
|
end
|
91
91
|
|
@@ -279,5 +279,10 @@ class CodeSnippets
|
|
279
279
|
end
|
280
280
|
rss_doc.to_s
|
281
281
|
end
|
282
|
+
|
283
|
+
def cache_reset()
|
284
|
+
@page_cache.reset
|
285
|
+
@doc_cache.reset
|
286
|
+
end
|
282
287
|
|
283
288
|
end
|