For a specific section on my website I loop through some categories and get the three latest posts in that categorie and list them. Like so:

&lt;?php $categories = get_categories(array('exclude' =&gt; '1, 4, 9, 10, 2899')); ?&gt;

&lt;?php foreach ($categories as $category) : ?&gt;
    &lt;div class="subject"&gt;
        &lt;h3&gt;&lt;?php echo $category-&gt;cat_name; ?&gt;&lt;/h3&gt;
        &lt;ul&gt;
            &lt;?php $args = array(
                'cat' =&gt; $category-&gt;cat_ID,
                'posts_per_page' =&gt; 3
            ); ?&gt;
            &lt;?php if (false === ( $category_posts_query = get_transient( 'category_posts' ) ) ) {
                $category_posts_query = new WP_Query($args);
                set_transient( 'category_posts', $category_posts_query, 36 * HOUR_IN_SECONDS );
            }
            ?&gt;
            &lt;?php while($category_posts_query-&gt;have_posts()) : ?&gt;
                &lt;?php $category_posts_query-&gt;the_post(); ?&gt;
                &lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;?php endwhile; ?&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;?php wp_reset_postdata(); ?&gt;
&lt;?php endforeach; ?&gt;


However, the result is not what is expected: all posts are the same across categories even though the posts don't belong to the different categories:


When I remove the transient for caching, everything works as expted.

&lt;?php $categories = get_categories(array('exclude' =&gt; '1, 4, 9, 10, 2899')); ?&gt;

&lt;?php foreach ($categories as $category) : ?&gt;
    &lt;div class="subject"&gt;
        &lt;h3&gt;&lt;?php echo $category-&gt;cat_name; ?&gt;&lt;/h3&gt;
        &lt;ul&gt;
            &lt;?php $args = array(
                'cat' =&gt; $category-&gt;cat_ID,
                'posts_per_page' =&gt; 3
            ); ?&gt;
            &lt;?php $category_posts_query = new WP_Query($args); ?&gt;
            &lt;?php while($category_posts_query-&gt;have_posts()) : ?&gt;
                &lt;?php $category_posts_query-&gt;the_post(); ?&gt;
                &lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;?php endwhile; ?&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;?php wp_reset_postdata(); ?&gt;
&lt;?php endforeach; ?&gt;


How do I add chacing to this last snippet?


Question: Can only access one of the router's web portal and the Internet
Answer: Sounds like there's competing DHCP servers on your network.  

A few questions for you:


What model router do you have?  
And have you turned on DHCP services on any computers on your network?
How many computers do you have on your network?  Can you turn them all off and turn them on 1 at a time until the problem shows up?