| 657 | } |
| 658 | |
| 659 | Result GetInfo(HCache cache, const char* uri, EntryInfo* info) |
| 660 | { |
| 661 | dmMutex::ScopedLock lock(cache->m_Mutex); |
| 662 | |
| 663 | uint64_t uri_hash = dmHashString64(uri); |
| 664 | Entry* entry = cache->m_CacheTable.Get(uri_hash); |
| 665 | if (entry != 0) |
| 666 | { |
| 667 | memcpy(info, &entry->m_Info, sizeof(*info)); |
| 668 | info->m_Valid = dmTime::GetTime() < info->m_Expires; |
| 669 | return RESULT_OK; |
| 670 | } |
| 671 | else |
| 672 | { |
| 673 | return RESULT_NO_ENTRY; |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | Result Get(HCache cache, const char* uri, const char* etag, FILE** file, uint32_t* file_size, uint64_t* checksum, |
| 678 | uint32_t* range_start, uint32_t* range_end, uint32_t* document_size) |