MCPcopy Create free account
hub / github.com/defold/defold / GetInfo

Function GetInfo

engine/dlib/src/dlib/http_cache.cpp:659–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 2

GetFunction · 0.70
TEST_FFunction · 0.50

Calls 2

GetTimeFunction · 0.70
GetMethod · 0.45

Tested by 1

TEST_FFunction · 0.40