Option to disable cache, please


#1

Please give some thought to enabling an option to disable all caching, memory and disk via menu option or script. It’s proving problematic to insure one is actually seeing latest revision, especially, when doing AV work where renaming file leads to need for re-writing FST and insuring all is correct there. It really slows iterative work where one might be changing AV rapidly - testing, changing again many times over a short period. Forgetting to reset cache and relog leads to not seeing changes - wasted time.

Also some mechanism to force a scene reload so we don’t have to do a relog would be nice.


#2

Instead of disabling cache how about a button that simply clears the cache?

Until this is added, since its using http connections , you can add ? after the URL path ( like filename.fst?1234 and reiterate after each version) . For both the fbx absolute path, and the FST file path


#3

Clearing cache works - but requires a relog and can be easy to forget when you’re focused on tedious work - like AV hacking.


#4

would be nice i was jsut running into cache probs trying to work on avatars, Ie unless u clear it, it doesn’t always update. meaning im not seeing the changes. Being able to disable it so your only seeing everything un cached would be handy


#5

For testing and reiterating I also host a localhost webserver. This speeds everything up as I no longer need to wait for anything to upload.

On my mac I use https://www.mamp.info/en/ on PC I use http://www.wampserver.com/en/


#6

It’s not about speed to load asset - it’s about cache not recognizing you’ve, admittedly been lazy, and not renamed an asset thus using a cached version vs the actual NEW asset.

But for AVs - this entails rewriting an FST to reference new name then uploading it and new FBX. When you’re uploading a new one maybe 10 - 20 times an hour trying to work out difficulties it makes a tedious slow process even worse and more prone to error in case you don’t realize you’re still looking at the previous iteration.


#7

It’s also surprising that “Reload Scripts” doesn’t retrieve updated version from server (it just reloads from cache).


#8

There’s a plethora of issues with caching that - especially for alpha level software where we’re constantly needing to make tiny changes to scripts, objects etc to discover functionality or workarounds make it rather cumbersome. It’s easy enough to disable, if you’re building your own executable, but that’s not something all can do.


#9

The cache iks terrible foir developers. making scripts is no fun because the cache. cache is annoying thing in high fidelity because it don’t check for new version.

So yes, option that you can disable cache and with scripts have reload button is really needed. And that im saying for a while now.

Not want a local server, and wamp you dont want on your system if ity’s not neede. It’s terrible application to that gives problems for me. Not a solution. just disable cache !


#10

Not a solution. just disable cache !

@Richardus.Raymaker is clearly very serious about this! :wink:


#11

You know what i mean, forgot one word. option to disable cache offcorse.


#13

I come possibly bearing gifts for you Guys.

This is a little something something developed by a VR guy here in DC.
It will allow you to open a text editor/ source code editor on any surface in a virtual environment so that you can code live in-world. Would this get you scripters around your cache-update problem?

The only potential cavet: this is for WebGL or WebVR projects, and I am still unsure whether HiFi is running on WebGL or not. But, if not, and if this helps, maybe someone can write a similar application that would work here.

Primrose Source Code Editor Control by Sean McBeth

@Richardus.Raymaker @OmegaHeron @chris @Judas


#14

Thanks for the idea, and it’s a cool idea, @SterlingWright, but it’s a cool idea for a problem that isn’t what we have here.


#15

Beyond this, Thoys already developed–a year ago–an in-world console.
I just learned. :-/ So, I have no gifts to give at the present moment.


#16

Not sure if anyone actually understood my workaround: please watch this video.

The reason I’m suggesting this is an official method with a button that would clear cache is because some web services also cache assets stored in them for faster loading.

Allowing end users to disable cache would only lead to users disabling cache because no one would know any better: which would only result to wasting bandwidth resources on content creator’s hosting servers.

Technically this feature would be an button to do unwitting DoS attack via bandwidth decay. **Ofcourse servers have safe-guards to prevent this: but it could leave to content simply not loading for people having cache disabled since their IP address would be blacklisted temporarily. ** and with that complaints.

Bandwidth is still a limiting factor, and can get quite pricy:
Considering I pay quarter of thousand per year for a distributed service with 100 Gb bandwidth (its a service so they make sure that nothing happens so I can stay lazy without having to do too much sysadmin work), it is enough for my purposes and with proper caching workable.

With a potential load from HF, I may have some issues later with my existing hosts, so I am currently looking into investing in some rack space and co-location services instead of ready providers.

Unlimited bandwidth is seriously a lie for server hosts, as it applies only to html pages, not files. With the normal web this is not much of an issue, but once you dealing with much larger files here this issue will popup. You can check any, of the, ToS on Unlimited Servers, and they will always mention in small print that the unlimited bandwidth is within reason…

Say you have a domain with 10-20 assets averaging at 10 mb per asset (including textures and animations): Add a 25 or so unique visitors (unique, as in someone loading for the first time or cleared cache) per day, or have people using some of those assets in their own domains. Eventually will start to have issues after a few weeks, unless there is caching in between. This is also the reason why Model optimization is very critical with models you bring in to high fidelity.

We should be thinking what happens if you scale our current situation upwards and consequences of having the ability to turn off cache

This work around solves also plethora of issues which happen when caching happens on multiple levels. Caching also happens on server side on most high-traffic sites, but this is to save actual cpu processing and page render time.

So instead of thinking of “disabling cache” we should go for a clear cache (that then would reload everything in the domain), and a workaround that is used by Web Developers, to help content creators to update their assets. This way, end users have the ability to check if an issue was related to their cache, instead disabling it completely.

Other method that would rely on the content creator would be to make the BatchLoader check the header of the http request, and check the Cache-Control header (See 14.9 of w3 spec) : if this would be set to no-cache, it wouldnt be cached. This way content creators can be responsible for their own bandwidth use instead of having the end users be responsible for their cache


#17

It was just an idea to mitigate a temporary annoyance, not something intended to exist as an option into future. Of course your way is correct for a proper implementation.

In any case, it is no longer as issue for me - I simply modified code and achieved what I needed and I’ll withdraw my worklist entry for this.


#18

aha it works u genius now we need @Menithal and @thoys to fight it out to see whoes best


#19

Well, the cache is nervy for model and script developers. For both we need a new reading in.
For scripts: if a script is changed outside, so automatically would be needed a new read in from the source and not from the cache… This should be easy possible.
For avatars: if I change my avatar, also the avatar should be read in new from the source. This also don’t need some bandwidth for normal users.


#20

I still suggest then my old idea. add reload button at some places. SO you can reload entitiy scripts or just the entitiy from the entitiy editor.

Reload means , ignore cache and load it from url. I think reload button is still the best option.

Other thread about some cache problem.
https://alphas.highfidelity.io/t/script-inside-entity-dont-load-new-script-after-changing-the-source-code/5000