# Optimization of Velocity configuration

**URL:** <https://forum.xwiki.org/t/optimization-of-velocity-configuration/4647>\
**Category:** Help / Discuss\
**Created:** [March 19, 2019, 9:46am UTC](https://forum.xwiki.org/t/optimization-of-velocity-configuration/4647 "2019-03-19T09:46:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsqyz519](https://forum.xwiki.org/user_avatar/forum.xwiki.org/hsqyz519/32/1959_2.png) [@hsqyz519](https://forum.xwiki.org/u/hsqyz519)\
**Post date:** [March 19, 2019, 9:46am UTC](https://forum.xwiki.org/t/optimization-of-velocity-configuration/4647/1 "2019-03-19T09:46:57Z")

</div>

With respect to Velocity configuration optimization, every time I refresh the view, it will call “Utils.parseTemplate” methods, but the parsing process seems to have a significant impact on performance. Can I configure the cache of Velocity ？ How ？

---

<div class="post-metadata">

**Author:** ![hsqyz519](https://forum.xwiki.org/user_avatar/forum.xwiki.org/hsqyz519/32/1959_2.png) [@hsqyz519](https://forum.xwiki.org/u/hsqyz519)\
**Post date:** [March 20, 2019, 7:33am UTC](https://forum.xwiki.org/t/optimization-of-velocity-configuration/4647/2 "2019-03-20T07:33:13Z")

</div>

If anyone can help me

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 20, 2019, 7:41am UTC](https://forum.xwiki.org/t/optimization-of-velocity-configuration/4647/3 "2019-03-20T07:41:47Z")

</div>

> [@hsqyz519](#):
>
> Can I configure the cache of Velocity ？

With Velocity 1.7, caching does more bad than good because of the way `#macros` are handled and the fact that we use them a bit everywhere in XWiki. The good news is that it’s been greatly improved in Velocity 2.x and we plan to upgrade in XWiki 11.4 and start playing with caching of `*.vm` templates and `{{velocity}}` macros.
