David Dick > Archive-Har-0.05 > Archive::Har::Entry::Cache::Request

Download:
Archive-Har-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Archive::Har::Entry::Cache::Request - Represents a cache request for a cache inside the HTTP Archive

VERSION ^

Version 0.05

SYNOPSIS ^

    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";
    }

SUBROUTINES/METHODS ^

expires

returns the expiration time of the cache entry

lastAccess

returns the last time the cache was accessed

etag

returns the etag of the cache

comment

returns the comment about element in the Query String

syntax highlighting: