# phpman > man > Cache::Object

## NAME
    [Cache::Object](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3AObject/markdown) -- the data stored in a Cache.

## DESCRIPTION
    Object is used by classes implementing the Cache interface as an object oriented wrapper around
    the data. End users will not normally use Object directly, but it can be retrieved via the
    get_object method on the [Cache::Cache](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3ACache/markdown) interface.

## SYNOPSIS
     use [Cache::Object](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3AObject/markdown);

     my $object = new [Cache::Object](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3AObject/markdown)( );

     $object->set_key( $key );
     $object->set_data( $data );
     $object->set_expires_at( $expires_at );
     $object->set_created_at( $created_at );

## METHODS
### new
        Construct a new [Cache::Object](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3AObject/markdown).

## PROPERTIES
    (get|set)_accessed_at
        The time at which the object was last accessed. Various cache implementations will use the
        accessed_at property to store information for LRU algorithms. There is no guarantee that all
        caches will update this field, however.

    (get|set)_created_at
        The time at which the object was created.

    (get|set)_data
        A scalar containing or a reference pointing to the data to be stored.

    (get|set)_expires_at
        The time at which the object should expire from the cache.

    (get|set)_key
        The key under which the object was stored.

    (get|set)_size
        The size of the frozen version of this object

## SEE ALSO
    [Cache::Cache](https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3ACache/markdown)

## AUTHOR
    Original author: DeWitt Clinton <<dewitt@unto.net>>

    Last author: $Author: dclinton $

    Copyright (C) 2001-2003 DeWitt Clinton

