Why?  std::pair is not my typical programming style.  I have therefore run 3 different versions of the function 1 billion times.  Results are rounded to seconds.

    uint64_t GetDBCacheCapacity(bool IsInternalDB)                        202 seconds
    std::pair<uint64_t, uint64_t> GetDBCacheCapacityPair()              268 seconds
    void GetDBCacheCapacity(uint64_t & internal, uint64_t & user);   270 seconds

(Ran the original function both before the other two and after to verify there was no startup impact.)

I think the key point here is that the caller of this routine only wants one value.  It is passing to the function a flag that was passed to it upon creation.  Returning both values will require more code at the calling points (in cache2.cc) to pick the proper value will further complicate the code.  I recommend staying with the current implementation since it is both faster and fits current usage best.