From c638ef6f065df8d8311d9bab7802f9c97526dca4 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 11 Feb 2014 02:37:41 +0100 Subject: disable simplepie caching, see https://github.com/simplepie/simplepie/issues/345#issuecomment-34718099 --- fetcher/feedfetcher.php | 2 ++ tests/unit/fetcher/FeedFetcherTest.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index 64ab73d68..fc9f4eae6 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -82,6 +82,8 @@ class FeedFetcher implements IFeedFetcher { $simplePie = $this->simplePieFactory->getCore(); $simplePie->set_feed_url($url); $simplePie->enable_cache(true); + $simplePie->set_stupidly_fast(true); // disable simple pie sanitation + // we use htmlpurifier $simplePie->set_timeout($this->fetchTimeout); $simplePie->set_cache_location($this->cacheDirectory); $simplePie->set_cache_duration($this->cacheDuration); diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index b9f68fdae..da7348fc9 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -140,6 +140,9 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { $this->core->expects($this->once()) ->method('set_cache_location') ->with($this->equalTo($this->cacheDirectory)); + $this->core->expects($this->once()) + ->method('set_stupidly_fast') + ->with($this->equalTo(true)); $this->core->expects($this->once()) ->method('set_cache_duration') ->with($this->equalTo($this->cacheDuration)); -- cgit v1.2.3