mirror of https://github.com/apache/cloudstack.git
dao: Hit the cache for entity flagged as removed too since they are put
in cache afterwards.
This commit is contained in:
parent
5251eeddf2
commit
696440a675
|
|
@ -969,7 +969,12 @@ public abstract class GenericDaoBase<T, ID extends Serializable> extends Compone
|
||||||
@Override
|
@Override
|
||||||
@DB()
|
@DB()
|
||||||
public T findByIdIncludingRemoved(ID id) {
|
public T findByIdIncludingRemoved(ID id) {
|
||||||
return findById(id, true, null);
|
if (_cache != null) {
|
||||||
|
final Element element = _cache.get(id);
|
||||||
|
return element == null ? findById(id, true, null) : (T)element.getObjectValue();
|
||||||
|
} else {
|
||||||
|
return findById(id, true, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue