<commit_before>/** public/js/routes/study/view.js
 *
 * @author <NAME> <<EMAIL>>
 * @copyright (c) 2012, The Neuroinformatics Research Group at Harvard University.
 * @copyright (c) 2012, The President and Fellows of Harvard College.
 * @license New BSD License (see LICENSE file for details).
 */

define([
    'jquery',
    'underscore',
    'views/study/view'
],
    function ($, _, ViewStudyView) {
        "use strict";

        var cache = [];

        return function (sid, options) {
            var store = options.store;

            if (!_.has(cache, sid)) {
                cache[sid] = new ViewStudyView({
                    collection: store.studies,
                    forms:      store.forms,
                    publishers: store.publishers,
                    model:      store.studies.get(sid)
                });

                cache[sid].render();
            }

            cache[sid].onShow();

            $('#content').html(cache[sid].el);
        };
    }); //define<commit_msg>routes/study/view: Remove cache<commit_after>/** public/js/routes/study/view.js
 *
 * @author <NAME> <<EMAIL>>
 * @copyright (c) 2012, The Neuroinformatics Research Group at Harvard University.
 * @copyright (c) 2012, The President and Fellows of Harvard College.
 * @license New BSD License (see LICENSE file for details).
 */

define([
    'jquery',
    'underscore',
    'views/study/view'
],
    function ($, _, ViewStudyView) {
        "use strict";

        var cache = [];

        return function (sid, options) {
            var store = options.store,
                viewStudy = new ViewStudyView({
                    collection: store.studies,
                    forms:      store.forms,
                    publishers: store.publishers,
                    model:      store.studies.get(sid)
                });

            viewStudy.render();
            viewStudy.onShow();

            $('#content').html(viewStudy.el);
        };
    }); //define
{'fraction_non_alphanumeric': 0.13069908814589665, 'fraction_numerical': 0.008105369807497468, 'mean_word_length': 1.739251040221914, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5806893', 'n_tokens_mistral': 576, 'n_tokens_neox': 518, 'n_words': 136}