Title: RSSCache::__construct
Published: August 18, 2015
Last modified: February 24, 2026

---

# RSSCache::__construct( $base,  $age )

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/rsscache/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/rsscache/__construct/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/rsscache/__construct/?output_format=md#wp--skip-link--target)

PHP5 constructor.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/rsscache/__construct/?output_format=md#source)󠁿

    ```php
    function __construct( $base = '', $age = '' ) {
    	$this->BASE_CACHE = WP_CONTENT_DIR . '/cache';
    	if ( $base ) {
    		$this->BASE_CACHE = $base;
    	}
    	if ( $age ) {
    		$this->MAX_AGE = $age;
    	}

    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rss.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/rss.php#L726)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rss.php#L726-L735)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/rsscache/__construct/?output_format=md#related)󠁿

| Used by | Description | 
| [RSSCache::RSSCache()](https://developer.wordpress.org/reference/classes/rsscache/rsscache/)`wp-includes/rss.php` |

PHP4 constructor.

  | 
| [fetch_rss()](https://developer.wordpress.org/reference/functions/fetch_rss/)`wp-includes/rss.php` |

Build Magpie object based on RSS from URL.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Frsscache%2F__construct%2F)
before being able to contribute a note or feedback.