Home | History | Annotate | Download | only in HttpBootDxe

Lines Matching refs:Cache

486   Release all the resource of a cache item.

488 @param[in] Cache The pointer to the cache item.
493 IN HTTP_BOOT_CACHE_CONTENT *Cache
501 if (Cache != NULL) {
505 if (Cache->RequestData != NULL) {
506 if (Cache->RequestData->Url != NULL) {
507 FreePool (Cache->RequestData->Url);
509 FreePool (Cache->RequestData);
515 if (Cache->ResponseData != NULL) {
516 if (Cache->ResponseData->Headers != NULL) {
517 for (Index = 0; Index < Cache
518 FreePool (Cache->ResponseData->Headers[Index].FieldName);
519 FreePool (Cache->ResponseData->Headers[Index].FieldValue);
521 FreePool (Cache->ResponseData->Headers);
528 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Cache->EntityDataList) {
537 FreePool (Cache);
554 HTTP_BOOT_CACHE_CONTENT *Cache;
557 Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
558 RemoveEntryList (&Cache->Link);
559 HttpBootFreeCache (Cache);
567 @param[in] Uri Uri of the file to be retrieved from cache.
592 HTTP_BOOT_CACHE_CONTENT *Cache;
601 Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
603 // Compare the URI to see whether we already have a cache for this file.
605 if ((Cache->RequestData != NULL) &&
606 (Cache->RequestData->Url != NULL) &&
607 (StrCmp (Uri, Cache->RequestData->Url) == 0))
610 // Hit in cache, record image type.
612 *ImageType = Cache->ImageType;
617 if (*BufferSize < Cache->EntityLength) {
618 *BufferSize = Cache->EntityLength;
626 NET_LIST_FOR_EACH (Entry2, &Cache->EntityDataList) {
693 // The caller doesn't provide a buffer, save the block into cache list.
695 if (CallbackData->Cache != NULL) {
706 InsertTailList (&CallbackData->Cache->EntityDataList, &NewEntityData->Link);
755 HTTP_BOOT_CACHE_CONTENT *Cache;
791 // Not found in cache, try to download it through HTTP.
795 // 1. Create a temp cache item for the requested URI if caller doesn't provide buffer.
797 Cache = NULL;
799 Cache = AllocateZeroPool (sizeof (HTTP_BOOT_CACHE_CONTENT));
800 if (Cache == NULL) {
804 Cache->ImageType = ImageTypeMax;
805 InitializeListHead (&Cache->EntityDataList);
882 // 2.3 Record the request info in a temp cache item.
884 if (Cache != NULL) {
885 Cache->RequestData = RequestData;
945 // 3.2 Cache the response header.
947 if (Cache != NULL) {
948 Cache->ResponseData = ResponseData;
949 Cache->ImageType = *ImageType;
961 Context.Cache = Cache;
1058 // Parse the new received block of the message-body, the block will be saved in cache.
1088 // 4. Save the cache item to driver's cache list and return.
1090 if (Cache != NULL) {
1091 Cache->EntityLength = ContentLength;
1092 InsertTailList (&Private->CacheList, &Cache->Link);
1108 HttpBootFreeCache (Cache);
1121 if (Cache != NULL) {
1122 FreePool (Cache);