# Stand alone view url helper when cli is used

**URL:** <https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459>\
**Category:** Components & MVC\
**Tags:** laminas-view, laminas-cli\
**Created:** [August 22, 2021, 11:46am UTC](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459 "2021-08-22T11:46:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ivel](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@ivel](https://discourse.laminas.dev/u/ivel)\
**Post date:** [August 23, 2021, 9:40pm UTC](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459/3 "2021-08-23T21:40:51Z")

</div>

Thank you for the suggestion. I was able to use that solution, I just wanted to “second” this topic , looking for “not so dirty” solution and having in mind your statement:

> [@onBootstrap not called for CLI commands](https://discourse.laminas.dev/t/onbootstrap-not-called-for-cli-commands/2447/9):
>
> The work on laminas-cli will continue and use cases like yours are needed! And if this forum post leads to a new feature request, then that’s good

Additionally I want to get an advice how to deal with the Config Cache - I notice that when it is enabled if the config cache is generated by the command it “breaks” the web interface because in keeps the URL Helper Factory from the command config. Vice versa if there is already some cached config, from web request, the command does not work because it doesn’t read the new config, it directly reads the cached one. I have overcome this solution by deleting the config cache files in the beginning of the command config file and just before it returns the container, but I am not sure whether this is the best solution…  
Thank you once again for your advices.

---

_[View the full topic](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459)._
