Example usage for com.liferay.portal.kernel.scripting Scripting clearCache

List of usage examples for com.liferay.portal.kernel.scripting Scripting clearCache

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.scripting Scripting clearCache.

Prototype

public void clearCache(String language) throws ScriptingException;

Source Link

Usage

From source file:com.slemarchand.sqlqueryscripting.hook.events.AppStartupAction.java

License:Open Source License

public void run(String[] ids) throws ActionException {

    if (_log.isInfoEnabled()) {
        _log.info(/*w ww .  ja  v a2 s.c o  m*/
                "Adding scripting executor for database queries - http://photons-project.org/sqlqueryscripting");
    }

    Scripting scripting = ScriptingUtil.getScripting();
    try {

        addScriptingExecutor(scripting, SQLQueryExecutor.LANGUAGE, new SQLQueryExecutor());

        scripting.clearCache(SQLQueryExecutor.LANGUAGE);
    } catch (ScriptingException e) {
        throw new ActionException(e);
    }

}