Skip to content

Commit

Permalink
Since pulling RSS from local machine, opting to not cache on localhos…
Browse files Browse the repository at this point in the history
…t as not really gaining any speed improvement
  • Loading branch information
pdweinstein committed May 3, 2020
1 parent 9055a39 commit 1a8ca2a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/pre.php
Expand Up @@ -20,7 +20,6 @@
$book = $memcache->get( 'goodreads' );
$instaObj = $memcache->get( 'instagram' );
$tweets = $memcache->get( 'twitter' );
$bPost = $memcache->get( 'blog' );

}

Expand Down Expand Up @@ -59,10 +58,6 @@

$tweets = json_decode( $twitter->setGetfield( $getfield )->buildOauth( $twitterURL, $requestMethod )->performRequest() );

$blog = simplexml_load_file( $rss );
$bPost = $blog->entry;
// var_dump( $blog->entry );
// exit;

}

Expand All @@ -87,9 +82,11 @@
$posts['twitter'] = strtotime( $tweet->created_at );
$feed['twitter'] = $tweets;

// Last Blog Post
$posts['blog'] = $bPost->published;
$feed['blog'] = $bPost;
// Last Blog Post
$blog = simplexml_load_file( $rss );
$bPost = $blog->entry;
$posts['blog'] = $bPost->published;
$feed['blog'] = $bPost;

// Sort Array of Unix Timestamps
arsort( $posts );
Expand All @@ -110,8 +107,7 @@
$memcache->set( 'goodreads', $book, MEMCACHE_COMPRESSED, 900 );
$memcache->set( 'instagram', $instaObj, MEMCACHE_COMPRESSED, 900 );
$memcache->set( 'twitter', $tweets, MEMCACHE_COMPRESSED, 900 );
$memcache->set( 'blog', $bPost, MEMCACHE_COMPRESSED, 900 );


}

?>

0 comments on commit 1a8ca2a

Please sign in to comment.