Questions tagged [httpresponsecache]

34 questions
17
votes
2 answers

Laravel 5.1 Object oriented ajax response caching

I'm working on a Laravel 5.1 project, using a lot of ajax calls returning html blocks. To optimize the speed of the website i want to implement private and public response caching. this works fine using following code: return response() …
Frederiek
  • 1,653
  • 1
  • 16
  • 27
12
votes
3 answers

Need an example of HttpResponseCache in Android

Hi I am trying to use the HttpResponseCache introduced in Android 4.The docs do talk clearly about how to install the cache but I am at a complete loss on how to cache Images downloaded from the net.Earlier I was using the DiskLruCache to cache…
Rasmus
  • 8,248
  • 12
  • 48
  • 72
6
votes
1 answer

Can I stop HTTPResponseCache behaving like a shared cache in regard to Cache-Control headers?

I am trying to use the built in HTTPResponseCache in my app (making requests via the HTTPURLConnection API) but am having problems trying to get it to cache any responses that were requested with an Authorization header included. The only way I can…
5
votes
0 answers

httpUrlConnection not returning cached response when server returns HTTP_NOT_MODIFIED

I have an api request which returns the response and also the response headers Last-Modified and Date. I am using HttpUrlConnection for making the HTTP.GET requests. I am also using HttpResponseCache to cache the responses. When the server returns a…
4
votes
1 answer

Is there a way to use any IDistributedCache as a ResponseCache in .net core?

I want to cache responses from APIs to DistributedSqlServerCache. The default ResponseCaching only uses a memory cache. There is a constructor which allows to configure what cache to use, but it's internal. I wrote a filter. If the response is not…
YehudaR
  • 41
  • 6
4
votes
2 answers

HttpResponseCache not working in Android Lollipop

I've been using in my app HttpResponseCache successfully, but when my phone updated to Lollipop I realized that HttpResponseCache now never get "hit", always do the network request. I've confirmed that in Android versions pre Lollipop are still…
3
votes
1 answer

Use LRU Image Caching In Conjuction With HTTPResponseCache for Disk and Memory Caching

Initially the objective was to use both disk and memory cache. This would require implementing LRU cache and DiskLruCache. However, since HTTPResponse cache uses disk space, I chose to use LRU cache and do con.setUseCaches(true); The problem is…
3
votes
1 answer

Using HttpResponseCache makes app crash

I'm trying to use HttpResponseCache to cache network data, but when I put install cache code to OnCreate and OnPause methods, app crashes. I used code from HttpResponseCache documentation. and compile errors appear as shown below. after using …
Mohamed Ibrahim
  • 3,714
  • 2
  • 22
  • 44
3
votes
1 answer

What Headers to use when using HttpResponseCache.get

I'm trying to use httpResponseCache to cache some of my requests. Problem is, I'd like to know if the request is cached before making the request. I saw in the source for HttpResponseCache that there is a get method that takes in (URI,…
jen0r8
  • 31
  • 2
3
votes
2 answers

Android HttpsURLConnection, how to tell if the response is cached?

I've got an app targeting ICS and above, and I'm trying to use HttpsURLConnection and HttpResponseCache to cache a web service response. It makes the request with an etag, and the server will return 304 if not modified. It appears to be returning…
s73v3r
  • 1,751
  • 2
  • 22
  • 48
3
votes
1 answer

java.lang.NoClassDefFoundError with HttpResponseCache and DiskLruCache

I´m trying test this cache Library in a new project Android. When I run the project, I get this Logcat: 01-24 03:45:31.109: E/AndroidRuntime(1983): FATAL EXCEPTION: main 01-24 03:45:31.109: E/AndroidRuntime(1983): Process: com.test_cache, PID:…
Randolf
  • 367
  • 1
  • 14
3
votes
1 answer

HttpResponseCache does not cache files

I am trying to cache this file: http://media.admob.com/sdk-core-v40.js with HttpResponseCache. Basically i am calling the getFileFromUrl function two times, so that the first time it gets the resource from the internet and the second time it gets it…
irena
  • 31
  • 2
2
votes
1 answer

Saving the response cache to the server in Net 5

As in Net MVC, I want to save the response cache to the server (it's called outputcache), but there is no such feature in Net Core or Net 5. I couldn't find an alternative method. Thank you in advance.
2
votes
2 answers

WebAPI core 2.0 Cache by post params

I am building an pure json api and I want to cache response according to post params. Is there any similar way like VaryByQueryKeys? Maybe some custom cache middleware or? Of course I can use MemoryCache but wonder maybe there is some "build in"…
2
votes
1 answer

Caching of response messages

We do a lot of REST calls and would like to cache much of those calls. What are our current options? Core does not support Output Caching at the moment, so can we use Response Caching or Distributed Caching for this? If Response Caching, can the IIS…
user1340582
  • 19,151
  • 35
  • 115
  • 171
1
2 3