<commit_before><?php
/**
 * Athene2 - Advanced Learning Resources Manager
 *
 * @author    <NAME> (<EMAIL>)
 * @license   LGPL-3.0
 * @license   http://opensource.org/licenses/LGPL-3.0 The GNU Lesser General Public License, version 3.0
 * @link      https://github.com/serlo-org/athene2 for the canonical source repository
 * @copyright Copyright (c) 2013-2014 Gesellschaft für freie Bildung e.V. (http://www.open-education.eu/)
 */
namespace Subject\Factory;

use Zend\Cache\StorageFactory;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class SubjectStorageFactory implements FactoryInterface
{
    /**
     * Create service
     *
     * @param ServiceLocatorInterface $serviceLocator
     * @return mixed
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $cache = StorageFactory::factory(
            [
                'adapter' => [
                    'name'    => 'apc',
                    'options' => [
                        'namespace' => __NAMESPACE__,
                        'ttl'       => 60 * 60
                    ]
                ],
                'plugins' => [
                    'exception_handler' => [
                        'throw_exceptions' => false
                    ],
                    'serializer'
                ]
            ]
        );

        return $cache;
    }

}
<commit_msg>Changed caching interval from 1 hour to 5 minutes<commit_after><?php
/**
 * Athene2 - Advanced Learning Resources Manager
 *
 * @author    <NAME> (<EMAIL>)
 * @license   LGPL-3.0
 * @license   http://opensource.org/licenses/LGPL-3.0 The GNU Lesser General Public License, version 3.0
 * @link      https://github.com/serlo-org/athene2 for the canonical source repository
 * @copyright Copyright (c) 2013-2014 Gesellschaft für freie Bildung e.V. (http://www.open-education.eu/)
 */
namespace Subject\Factory;

use Zend\Cache\StorageFactory;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class SubjectStorageFactory implements FactoryInterface
{
    /**
     * Create service
     *
     * @param ServiceLocatorInterface $serviceLocator
     * @return mixed
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $cache = StorageFactory::factory(
            [
                'adapter' => [
                    'name'    => 'apc',
                    'options' => [
                        'namespace' => __NAMESPACE__,
                        'ttl'       => 60 * 5
                    ]
                ],
                'plugins' => [
                    'exception_handler' => [
                        'throw_exceptions' => false
                    ],
                    'serializer'
                ]
            ]
        );

        return $cache;
    }

}

{'fraction_non_alphanumeric': 0.10581273929690219, 'fraction_numerical': 0.01427079707622694, 'mean_word_length': 1.6635773864689527, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3834587', 'n_tokens_mistral': 795, 'n_tokens_neox': 734, 'n_words': 166}