unsigned PackageImpl::mediaNr() const
{
- return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationMediaNr() );
+ if ( _mnr == (unsigned)-1 )
+ {
+ _mnr = _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationMediaNr() );
+ }
+ return _mnr;
}
ByteCount PackageImpl::downloadSize() const
private:
repo::cached::RepoImpl::Ptr _repository;
data::RecordId _id;
+
+ mutable DefaultIntegral<unsigned,(unsigned)-1> _mnr;
};
/////////////////////////////////////////////////////////////////
} // namespace cached
unsigned SrcPackageImpl::mediaNr() const
{
- return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationMediaNr() );
+ if ( _mnr == (unsigned)-1 )
+ {
+ _mnr = _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationMediaNr() );
+ }
+ return _mnr;
}
ByteCount SrcPackageImpl::downloadSize() const
virtual Date installtime() const;
virtual OnMediaLocation location() const;
+
private:
repo::cached::RepoImpl::Ptr _repository;
data::RecordId _id;
+
+ mutable DefaultIntegral<unsigned,(unsigned)-1> _mnr;
};
/////////////////////////////////////////////////////////////////
} // ns cached