Archive::Har::Entry::Cache::Request - Represents a cache request for a cache inside the HTTP Archive
Version 0.03
use Archive::Har(); my $http_archive_string = '"log": { "version": "1.1", .... '; my $har = Archive::Har->new(); $har->string($http_archive_string); foreach my $entry ($har->entries()) { my $cache = $entry->cache(); my $beforeRequest = $cache->beforeRequest(); print "Expires: " . $beforeRequest->expires() . "\n"; print "Last Access: " . $beforeRequest->lastAccess() . "\n"; print "etag: " . $beforeRequest->etag() . "\n"; print "hitCount: " . $beforeRequest->hitCount() . "\n"; print "Comment: " . $beforeRequest->comment() . "\n"; my $afterRequest = $cache->afterRequest(); print "Expires: " . $afterRequest->expires() . "\n"; print "Last Access: " . $afterRequest->lastAccess() . "\n"; print "etag: " . $afterRequest->etag() . "\n"; print "hitCount: " . $afterRequest->hitCount() . "\n"; print "Comment: " . $afterRequest->comment() . "\n"; }
returns the expiration time of the cache entry
returns the last time the cache was accessed
returns the etag of the cache
returns the comment about element in the Query String
To install Archive::Har, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Archive::Har
CPAN shell
perl -MCPAN -e shell install Archive::Har
For more information on module installation, please visit the detailed CPAN module installation guide.