java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit cc27b05a6d0c6ef70d28e379e2648c965920bb1c
Author: Tasos Papaioannou <tpapaioa(a)redhat.com>
Date: Mon Jul 23 11:24:26 2012 +0200
813841 - do not cache snapshot tags within the lookup method
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
index fb45cda..8309ed2 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -852,8 +852,9 @@ public class ServerFactory extends HibernateFactory {
SnapshotTag retval = (SnapshotTag) HibernateFactory
.getSession().getNamedQuery("SnapshotTag.lookupByTagName")
.setString("tag_name", tagName)
- // Retrieve from cache if there
- .setCacheable(true).uniqueResult();
+ // Do not use setCacheable(true), as tag deletion will
+ // usually end up making this query's output out of date
+ .uniqueResult();
return retval;
}
}
Show replies by date