jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob <b.mel...@gmail.com>
Subject Re: HTTP Cache Manager is not caching static files
Date Sat, 01 Aug 2015 04:01:00 GMT
Sorry, first request was just exception.

On 01/08/15 00:28, Felix Schumacher wrote:
> Am 31.07.2015 um 07:39 schrieb Bob:
>> Hi Felix,
>>
>> Thanks for reply. I'm using JMeter 2.13 and found that server is 
>> returning etag and last-modified headers.
>>
>> Response headers:
>> HTTP/1.1 200 OK
>> Date: Fri, 31 Jul 2015 05:37:46 GMT
>> Server: Apache/2.4.10 (Debian)
>> Last-Modified: Tue, 03 Mar 2015 11:17:33 GMT
>> ETag: "867-510607b3a3394"
>> Accept-Ranges: bytes
>> Content-Type: image/png
>> Content-Length: 2151
>> Age: 0
>
> Your first example didn't include etag or last-modified. Are these 
> (and the previous ones) just extracts from all response headers?
>
> Regards
>  Felix
>
>>
>> On 30/07/15 10:14, Felix Schumacher wrote:
>>>
>>> Am 29. Juli 2015 21:22:46 MESZ, schrieb Felix Schumacher 
>>> <felix.schumacher@internetallee.de>:
>>>> Am 29.07.2015 um 13:59 schrieb Bob:
>>>>> I think it might be because of headers in "HTTP Header Manager" as
>>>>> request was recorded via "HTTP(S) Test Script Recorder". But don't
>>>>> know how to solve the problem. Any best practices sending HTTP
>>>> headers
>>>>> to manage concurrent pool and cache option?
>>>> You could have told us, which version of jmeter you are using.
>>>>
>>>> If you are using a current nightly build, chances are, that you are
>>>> using a new feature of the cache manager. Your response headers show a
>>>> "Vary" header. Those requests will not be cached anymore.
>>>>
>>>> If you are using a stable build, it might be that you stumbled upon a
>>>> bug.
>>> Having slept over it and rereading the documentation I think it will 
>>> not cache responses, that are missing etag, last-modified or 
>>> cache-control/expires headers.
>>>
>>> None of those headers are in your response, so the cache manager 
>>> will not save your responses.
>>>
>>> For more info see 
>>> http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cache_Manager
>>>
>>> Regards,
>>> Felix
>>>
>>>> If I read the code correct, than there is missing an else statement
>>>> with
>>>> a "return true;" in CacheManager#inCache(URL) for the if statement for
>>>> "entry == null".
>>>>
>>>> But on the other hand, the javadocs for that method and the behaviour
>>>> of
>>>> the method match, so it might be intended.
>>>>
>>>> Regards,
>>>>   Felix
>>>>> On 29/07/15 13:44, Bob wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm using "HTTP Cache Manager" with default settings and when I run
>>>>>> test with 1 user, 2 iterations static files are not being cached.
>>>>>> When I increase iteration and run test, the caching behavior is the
>>>>>> same, it's downloading static files each time from server instead
of
>>>>>> using from cache. Here is log from headers:
>>>>>>
>>>>>> Thread Name: Thread Group 1-1
>>>>>> Sample Start: 2015-07-29 13:38:37 UZT
>>>>>> Load time: 5293
>>>>>> Connect Time: 0
>>>>>> Latency: 246
>>>>>> Size in bytes: 280405
>>>>>> Headers size in bytes: 11512
>>>>>> Body size in bytes: 268893
>>>>>> Sample Count: 1
>>>>>> Error Count: 0
>>>>>> Response code: 200
>>>>>> Response message: OK
>>>>>>
>>>>>> Response headers:
>>>>>> HTTP/1.1 200 OK
>>>>>> Date: Wed, 29 Jul 2015 08:38:37 GMT
>>>>>> Server: Apache/2.4.10 (Debian)
>>>>>> X-Powered-By: PHP/5.6.9-0+deb8u1
>>>>>> Vary: Accept-Encoding
>>>>>> Content-Type: text/html; charset=utf-8
>>>>>> Content-Length: 38259
>>>>>> Connection: Keep-Alive
>>>>>> Content-Encoding: gzip
>>>>>>
>>>>>>
>>>>>> HTTPSampleResult fields:
>>>>>> ContentType: text/html; charset=utf-8
>>>>>> DataEncoding: utf-8
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message