# cacheTime=0 does not work as expected

**URL:** <https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [November 14, 2010, 8:35pm UTC](https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477 "2010-11-14T20:35:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 14, 2010, 8:35pm UTC](https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477/1 "2010-11-14T20:35:57Z")

</div>

I want to refresh the source page each time I access it
I've run into a snag with a couple of my plugins. In both cases, users interact with the source webpages. The interactions are handled primarily by HTTP requests. The problem I'm having is that the changes in the webpage caused by the user interaction is not being picked up by the plugin because the plugin keeps loading the page from cache  
  
I have tried setting a zero cache time for the relevant requests, like so:  

```auto

HTTP.Request(url, errors='ignore', cacheTime=0).content

```

  
  
I've tried (even though it's not recommended) setting the global cache time in the Start() function, like so:  

```auto

HTTP.CacheTime=0

```

  
  
Neither one on its own or combined has the desired effect. Exiting the plugin and restarting it (and/or Plex and PMS) cannot reliably cause the cache to refresh.  
  
Am I missing something? Is this possibly a limitation of the Framework? (I'm coding for v2 framework, if it matters).  
  
Any thoughts on the matter would be appreciated.

---

<div class="post-metadata">

**Author:** ![jwray](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwray/32/99832_2.png) [@jwray](https://forums.plex.tv/u/jwray)\
**Post date:** [November 15, 2010, 1:55am UTC](https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477/2 "2010-11-15T01:55:11Z")

</div>

Hmm, the cacheTime=0 worked for me last week with CouchPotatoe fix. Wonder what’s different?  
  
  
  
That said, I vaguely remember something about a bug with cacheTime=0, have you tried cacheTime=1?

> [@](#):
>
> I've run into a snag with a couple of my plugins. In both cases, users interact with the source webpages. The interactions are handled primarily by HTTP requests. The problem I'm having is that the changes in the webpage caused by the user interaction is not being picked up by the plugin because the plugin keeps loading the page from cache  
>   
> I have tried setting a zero cache time for the relevant requests, like so:  
> 
> ```auto
> 
> HTTP.Request(url, errors='ignore', cacheTime=0).content
> 
> ```
> 
>   
>   
> I've tried (even though it's not recommended) setting the global cache time in the Start() function, like so:  
> 
> ```auto
> 
> HTTP.CacheTime=0
> 
> ```
> 
>   
>   
> Neither one on its own or combined has the desired effect. Exiting the plugin and restarting it (and/or Plex and PMS) cannot reliably cause the cache to refresh.  
>   
> Am I missing something? Is this possibly a limitation of the Framework? (I'm coding for v2 framework, if it matters).  
>   
> Any thoughts on the matter would be appreciated.

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 15, 2010, 5:47pm UTC](https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477/3 "2010-11-15T17:47:19Z")

</div>

> [@](#):
>
> Hmm, the cacheTime=0 worked for me last week with CouchPotatoe fix. Wonder what's different?  
>   
> That said, I vaguely remember something about a bug with cacheTime=0, have you tried cacheTime=1?

  
  
I haven't tried just using a small cache like that. I'll give that a try. Thanks for the tip.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:52pm UTC](https://forums.plex.tv/t/cachetime-0-does-not-work-as-expected/6477/4 "2019-12-20T20:52:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
