Examples of clearQueryCache()


Examples of org.b3log.latke.repository.Transaction.clearQueryCache()

                   "Processing an event[type={0}, data={1}] in listener[className={2}]",
                   new Object[]{event.getType(), plugins,
                                PluginRefresher.class.getName()});

        final Transaction transaction = pluginRepository.beginTransaction();
        transaction.clearQueryCache(false);
        try {
            Plugins.refresh(plugins);
            transaction.commit();
        } catch (final Exception e) {
            if (transaction.isActive()) {
View Full Code Here

Examples of org.b3log.latke.repository.Transaction.clearQueryCache()

     * @throws ServiceException service exception
     */
    public void updateArticlesRandomValue(final int updateCnt)
            throws ServiceException {
        final Transaction transaction = articleRepository.beginTransaction();
        transaction.clearQueryCache(false);
        try {
            final List<JSONObject> randomArticles = articleRepository.getRandomly(updateCnt);

            for (final JSONObject article : randomArticles) {
                article.put(Article.ARTICLE_RANDOM_DOUBLE, Math.random());
View Full Code Here

Examples of org.b3log.latke.repository.Transaction.clearQueryCache()

        final PreferenceRepository preferenceRepository = PreferenceRepositoryImpl.getInstance();

        final Transaction transaction = preferenceRepository.beginTransaction();

        // Cache will be cleared manaully if necessary, see loadPreference.
        transaction.clearQueryCache(false);
        try {
            loadPreference();

            if (transaction.isActive()) {
                transaction.commit();
View Full Code Here

Examples of org.b3log.latke.repository.Transaction.clearQueryCache()

            return;
        }

        final Transaction transaction = statisticRepository.beginTransaction();
        transaction.clearQueryCache(false);
        try {
            // For blog view counter
            statisticRepository.update(Statistic.STATISTIC, statistic);

            // For article view counter
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.