<commit_before>class Muck::TopicsController < ApplicationController
  unloadable
  
  before_filter :adjust_format_for_iphone
  before_filter :check_terms, :except => [:new]
  before_filter :build_tag_feeds, :only => [:show, :rss_discovery]
  before_filter :configure_feed_loading, :only => [:show, :rss_discovery]
  
  def show
    
    load_feeds
    load_combined_feeds
    
    respond_to do |format|
      format.html do
        @opml_path = topic_path(params[:id], :service_ids => params[:service_ids], :format => 'opml')
        render :template => 'topics/show'
      end
      format.opml { render :template => 'topics/show' }
      format.iphone { render :template => 'topics/show' }
    end
  end

  def rss_discovery
    render :template => 'aggregations/rss_discovery'
  end

  def photos
    @terms = CGI.unescape(params[:id])
    @page_title = @title = @terms.titleize
    @photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids])
    @number_of_images = 36
    respond_to do |format|
      format.html do
        render :template => 'topics/photos'
      end
      format.iphone { render :template => 'topics/photos' }<commit_msg>added page caching to topics<commit_after>class Muck::TopicsController < ApplicationController
  unloadable
  
  before_filter :adjust_format_for_iphone
  before_filter :check_terms, :except => [:new]
  before_filter :build_tag_feeds, :only => [:show, :rss_discovery]
  before_filter :configure_feed_loading, :only => [:show, :rss_discovery]
  
  caches_page [:show, :rss_discovery, :photos, :videos]
  
  def show
    
    load_feeds
    load_combined_feeds
    
    respond_to do |format|
      format.html do
        @opml_path = topic_path(params[:id], :service_ids => params[:service_ids], :format => 'opml')
        render :template => 'topics/show'
      end
      format.opml { render :template => 'topics/show' }
      format.iphone { render :template => 'topics/show' }
    end
  end

  def rss_discovery
    render :template => 'aggregations/rss_discovery'
  end

  def photos
    @terms = CGI.unescape(params[:id])
    @page_title = @title = @terms.titleize
    @photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids])
    @number_of_images = 36
    respond_to do |format|
      format.html do
        render :template => 'topics/photos'
      end
      format.iphone { render :template => 'topics/photos' }
{'fraction_non_alphanumeric': 0.11363636363636363, 'fraction_numerical': 0.001652892561983471, 'mean_word_length': 3.49165120593692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4727140', 'n_tokens_mistral': 825, 'n_tokens_neox': 792, 'n_words': 171}