How to reload single entity , without clearing whole cache? No not ?v=


#1

This problem still seems not be fixt.
You test mesh object, there’s a small error. fixt it. delete old asset from my assets. Then load the new one with the same filename, because that is logic. Sadly after copy and paste that url into the existing entity, Nothing happens.

I now need to clear the whole cache to update one single object. no ?v is not the solution, not tried it btw to because i forgot it. not sure if it works too.

High fidelity need option so you can update some asset in everyones cache on the domain. We need some reload flag, or something like that so the cache knows the object is changed.

Also clear cache is not placed in a userfriendly location in the menu. And a clear cache is reloading everything. including scripts.

And not like now that you need to force everybody to clear the whole cache. It’s soem problems that exists for a lobg time and still not solved in a good way.


#2

The thing is, the parameter is the only way forward with this.

Because if you have a reload flag, it would always force the content to reload the file over and over again for EVERYONE until the reload flag is turned off. But it doesnt take account anyone who hasnt been there before, so it still wouldnt be for everyone.

Since we load most of our models through HTTP:

HTTP Cache or Expires / Cache-Control
in laymans works in the following method:

  1. checking url path
  2. looking up if a local file.
  3. check if it is not yet expired.
  4. If above passes, load local file.

Nothing else should interupt it. (this is a Protocol header definition, see 14.9, 14.21)

This is why I keep saying the Parameter addition of just ?randomNumbers because it is the way to do it. You can read more here https://blog.httpwatch.com/2007/12/10/two-simple-rules-for-http-caching/ But yes. the ?v still works, and I’ve been using it quite extensively.

?v=# is a standard method of forcing people to reload a file that is cached over HTTP.

Related:
https://www.scirra.com/forum/can-i-force-browser-to-clear-cache-after-publishing-changes_t109856
http://www.impressivewebs.com/force-browser-newest-stylesheet/

If you load it as a file (File://) from your local disk, the objects should instant update right now. Atleast for shaders it works this way, I have not tested models on this yet.

For ATP, you have to update the overall UUID anyway if it is a completely new version of the model, so it shouldnt impact that as much (granted, I have not tried ATP very heavily yet)


#3

Ok. well. a new uiploaded file with the same name is not updating the entity. Now i need to say that i have not tested by going to other domain and back. But it need to reload the object.

?v= can be a good way. but can high fidelity not do that automatic ? If you update url in existing object it add some ID at the end of the url. some UUID ?

Why doing manual ?v= is a bad idea. you lose count at some point (mabye because tiny font ?) and if you lose count you start to generate a number that already is in use. So the only safe way is if high fidelity is doing this process automatic and invisible for the user.


#4

The problem with automatic is the fact that then you’d really have to make sure that if you actually want the cache to work, you have to make sure each object has the same url. If it was invisible param, it would completely lose the point of the cache (because every single model would be loaded separately, even if they were the same). Its more safer for the edit window to have everything-on-hands instead of have anything invisible… Instead it should be a button that adds/updates a timestamp to the end (which actually, I could implement)

So far
I personally just use a random smash-keyboard no sense stuff like

?aowie7rioquifoashdilhfiashgiohasfiohjaw

or even if I get frustated
?whythehellisthisnotworkingattemptäalksejhgjavlkaejfopkmawrefweafaw

instead of incrementing a number. You can have anything in it after all. this can be as long as you want.

Then when done then I use a Version number. usually I do not need to do it so often.


#5

In my whole hifi life i have done it so many times. And it’s annoying. and just smashing some keys is not working becausde you pretty sure hit the same combination sooner or later. not really a solution.

In the edit window a checkbox with UUID generator would be the solution that add the ?v=[UUID] in seperate edit box but still program wise as one line. You still get the problem that you then need to update every object manual if you own more. For builders the cache is a drama. and for visitors it’s going to be a drama to if the not know the need to refresh the cache.

Why can high fidelity not send a list with changed objects to the client ? There’s still a bump in the workflow. I suspect at some point that visitors start to see different things because the cache.


#6

Fresh visitors wont have any issues loading the newest objects.

Its the old visitors that will always see the cached content. But generally speaking if something is placed, you do not tend to modify it there after, unless you really.

But seriously, the chances of you colliding go so astronomical after hitting 24 characters at the end of the url that you wont hit it with the same object. Youd have better chance winning at the lottery.

And In any case, I have a better solution coming since I am tired of inputting the random values my self and it should be done through a button PR comming up in an hour or two. Better solution to yours is just add a time stamp into the version value. Thats it. No need to uuids.


#7

TimeStamp is just as good as UUID. but better readable. Just wanted to see if we can find teh rigth solution. Looks at the horizon… :wink:


#8

Can you reuse the url with timestamp on other entities. Otherwise i get the feeling you get oject duplication in cache. just because url is different.

So there’s a catch we need to watch.


#9

Yes, you can use the same url on other entities with the same params and it should load the same as if loading from the same url


#10