How Traccar cache works?

gustavofarias7 years ago

Accidentally I changed the "coordinates format" of an user from blank to some of the values. I tried to revert this, but it's impossible since the blank option is not in the list. Off topic: This way the user can never again take the defaults from the server configuration once he changes to some value. That is a problem for the manager of many users.

In the database I changed the value in "coordinateformat" column of table "users" from something to blank (not null, blank as in other users). But surprisingly, the web interface still shows the previous value (not blank) no matter what I do. I signed out a few times, cleaned cache, changed browser, signed in with admin and so on. I really hope I don't need to restart Traccar service.

So, why is this? Is this some kind of crazy server cache?

Anton Tananaev7 years ago

"Decimal Degrees" is the default format for coordinates.

I'm not sure why do you think it's crazy. There is cache in Traccar, so you should only use API to make any changes. If you change database directly, you would need to restart service.

gustavofarias7 years ago

Crazy in the sense of exaggerated. But if one really needs to restart service, it's eternal not exaggerated. Anyway, I really think there should be a note somewhere quite visible in the documentation stating: "You should never change database directly", because this is the first thing anyone would try when something is not working.
How is one supposed to operate the server using the API without a client? Is there some kind of scaffolding form?

Anton Tananaev7 years ago

How do you operate database without a client? I'm sure that you are using some tool, right?

gustavofarias7 years ago

I use a tool to operate database. But as you said, I shouldn't. I should use the API. I'm talking about a client to the API, not the database.

Anton Tananaev7 years ago

Well, there are plenty of tools to operate API. I don't see much difference. There are some swagger tools that you can use or any of the other REST API tool out there. There are many options.