<commit_before>﻿namespace VetSystem.Web.Controllers
{
    using System.Linq;
    using System.Web.Mvc;

    using VetSystem.Services.Data.Contracts;
    using VetSystem.Web.Infrastructure.Mapping;
    using VetSystem.Web.ViewModels.Clinics;

    public class HomeController : BaseController
    {
        private readonly IClinicsService clinics;

        public HomeController(IClinicsService clinics)
        {
            this.clinics = clinics;
        }

        public ActionResult Index()
        {
            return this.View();
        }

        [HttpGet]
        [ChildActionOnly]
        public ActionResult GetClinicsRatedPartial()
        {
            var clinics =
                this.Cache.Get(
                    "ClinicsRated",
                    () => this.clinics
                        .MostRated(5)
                        .To<ClinicSimpleRatedViewModel>()
                        .ToList(),
                        60 * 60);

            return this.PartialView("_SimpleClinicsRatedPartial", clinics);
        }

        [HttpGet]
        [ChildActionOnly]
        public ActionResult GetClinicsTopPetsCountPartial()
        {
            var clinics =
                this.Cache.Get(
                    "ClinicsTopPetsCount",
                    () => this.clinics
                        .TopPetsCount(5)
                        .To<ClinicSimpleToPetCountViewModel>()
                        .ToList(),
                        60 * 60);

            return this.PartialView("_SimpleClinicsPetsPartial", clinics);
        }
    }
}<commit_msg>Some private constants in home controller<commit_after>﻿namespace VetSystem.Web.Controllers
{
    using System.Linq;
    using System.Web.Mvc;

    using VetSystem.Services.Data.Contracts;
    using VetSystem.Web.Infrastructure.Mapping;
    using VetSystem.Web.ViewModels.Clinics;

    public class HomeController : BaseController
    {
        private const int TimeForCache = 60 * 60;
        private const int NumberOfTopClinics = 5;

        private readonly IClinicsService clinics;

        public HomeController(IClinicsService clinics)
        {
            this.clinics = clinics;
        }

        public ActionResult Index()
        {
            return this.View();
        }

        [HttpGet]
        [ChildActionOnly]
        public ActionResult GetClinicsRatedPartial()
        {
            var clinics =
                this.Cache.Get(
                    "ClinicsRated",
                    () => this.clinics
                        .MostRated(NumberOfTopClinics)
                        .To<ClinicSimpleRatedViewModel>()
                        .ToList(),
                        TimeForCache);

            return this.PartialView("_SimpleClinicsRatedPartial", clinics);
        }

        [HttpGet]
        [ChildActionOnly]
        public ActionResult GetClinicsTopPetsCountPartial()
        {
            var clinics =
                this.Cache.Get(
                    "ClinicsTopPetsCount",
                    () => this.clinics
                        .TopPetsCount(NumberOfTopClinics)
                        .To<ClinicSimpleToPetCountViewModel>()
                        .ToList(),
                        TimeForCache);

            return this.PartialView("_SimpleClinicsPetsPartial", clinics);
        }
    }
}
{'fraction_non_alphanumeric': 0.07798855766335441, 'fraction_numerical': 0.004516711833785004, 'mean_word_length': 1.423048869438366, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '7483071', 'n_tokens_mistral': 907, 'n_tokens_neox': 825, 'n_words': 146}