Home | History | Annotate | Download | only in HttpBootDxe

Lines Matching refs:Cache

460   Release all the resource of a cache item.

462 @param[in] Cache The pointer to the cache item.
467 IN HTTP_BOOT_CACHE_CONTENT *Cache
475 if (Cache != NULL) {
479 if (Cache->RequestData != NULL) {
480 if (Cache->RequestData->Url != NULL) {
481 FreePool (Cache->RequestData->Url);
483 FreePool (Cache->RequestData);
489 if (Cache->ResponseData != NULL) {
490 if (Cache->ResponseData->Headers != NULL) {
491 for (Index = 0; Index < Cache->ResponseData->HeaderCount; Index++) {
492 FreePool (Cache->ResponseData->Headers[Index].FieldName);
493 FreePool (Cache->ResponseData->Headers[Index].FieldValue);
495 FreePool (Cache->ResponseData->Headers);
502 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Cache->EntityDataList) {
511 FreePool (Cache);
528 HTTP_BOOT_CACHE_CONTENT *Cache;
531 Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
532 RemoveEntryList (&Cache->Link);
533 HttpBootFreeCache (Cache);
541 @param[in] Uri Uri of the file to be retrieved from cache.
564 HTTP_BOOT_CACHE_CONTENT *Cache;
573 // Search file in the cache list, the cache entry will be released upon a successful
577 Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
579 // Compare the URI to see whether we already have a cache for this file.
581 if ((Cache->RequestData != NULL) &&
582 (Cache->RequestData->Url != NULL) &&
583 (StrCmp (Uri, Cache->RequestData->Url) == 0))
586 // Hit cache, check buffer size.
588 if (*BufferSize < Cache->EntityLength) {
589 *BufferSize = Cache->EntityLength;
597 NET_LIST_FOR_EACH (Entry2, &Cache->EntityDataList) {
613 RemoveEntryList (&Cache->Link);
614 HttpBootFreeCache (Cache);
670 // The caller doesn't provide a buffer, save the block into cache list.
672 if (CallbackData->Cache != NULL) {
683 InsertTailList (&CallbackData->Cache->EntityDataList, &NewEntityData->Link);
729 HTTP_BOOT_CACHE_CONTENT *Cache;
763 // Not found in cache, try to download it through HTTP.
767 // 1. Create a temp cache item for the requested URI if caller doesn't provide buffer.
769 Cache = NULL;
771 Cache = AllocateZeroPool (sizeof (HTTP_BOOT_CACHE_CONTENT));
772 if (Cache == NULL) {
776 InitializeListHead (&Cache->EntityDataList);
858 // 2.3 Record the request info in a temp cache item.
860 if (Cache != NULL) {
861 Cache->RequestData = RequestData;
902 // 3.2 Cache the response header.
904 if (Cache != NULL) {
905 Cache->ResponseData = ResponseData;
917 Context.Cache = Cache;
1008 // Parse the new received block of the message-body, the block will be saved in cache.
1036 // 4. Save the cache item to driver's cache list and return.
1038 if (Cache != NULL) {
1039 Cache->EntityLength = ContentLength;
1040 InsertTailList (&Private->CacheList, &Cache->Link);
1056 HttpBootFreeCache (Cache);
1069 if (Cache != NULL) {
1070 FreePool (Cache);