* [gentoo-commits] proj/glsamaker:master commit in: app/models/
@ 2011-02-25 19:43 Alex Legler
0 siblings, 0 replies; only message in thread
From: Alex Legler @ 2011-02-25 19:43 UTC (permalink / raw
To: gentoo-commits
commit: c130f2fb2b7b84b250258930546f8f9e9f7d0246
Author: Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Fri Feb 25 19:23:24 2011 +0000
Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Fri Feb 25 19:38:12 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/glsamaker.git;a=commit;h=c130f2fb
Add a method to invalidate the last_revision cache
---
app/models/glsa.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/app/models/glsa.rb b/app/models/glsa.rb
index 04cac90..d8efa0b 100644
--- a/app/models/glsa.rb
+++ b/app/models/glsa.rb
@@ -25,6 +25,11 @@ class Glsa < ActiveRecord::Base
def last_revision
@last_revision ||= self.revisions.find(:first, :order => "revid DESC")
end
+
+ # Invalidates the last revision cache
+ def invalidate_last_revision_cache
+ @last_revision = nil
+ end
# Returns the next revision ID to be given for this GLSA
def next_revid
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-25 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 19:43 [gentoo-commits] proj/glsamaker:master commit in: app/models/ Alex Legler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox