Skip to content
TORNLIFE More

[API] armorynews sorting & cache

Started by Kivou [2000607] on in Bugs & Issues.

4 replies · 228 views · thread synced · 3 days ago · View on torn.com
About this thread

Posts archived: 5 / 5 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
5
Discussion span
→
People posting
3
Likes on archived posts
16
Posts by staff, officers and moderators
3
Authority score
60 / 100
Historical score
41 / 100
Story score
43 / 100
Engagement score
53 / 100

Most-liked replies

Kivou [2000607]
Hey,

I think there is an issue with how news from the faction/armorynews section are sorted using from/to. It sorts them from present to past (like the logs) and not from past to present (like attacks).

I remember we had a discussion on the forums with ched and he agreed on keeping past to present for all queries except the logs. Maybe it has changed and I missed the memo. But since I started having bug reports from my users a week ago I was thinking more of an issue related to the migration.

On a side note the cache acts a bit funky too. When I look at the server timestamp I've got inconsistencies like if I were randomly getting cache results from different places.

On a side side note the cache on the faction/attacks section seems disabled, I always get a new server timestamp. But tbh I don't remember if this section is supposed to be cached.

Thanks,

Kivou
Chedburn [1] Admin Developer
I think there is an issue with how news from the faction/armorynews
I remember we had a discussion on the forums with ched and he agreed on keeping past to present for all queries except the logs.

This may have happened when faction news' storage method was switched. Let's check with Roman.

I intend to look at API caching again, I think we need to include timestamps / to / from / e.t.c. in the cache keys so they're always cached individually. That's the only way we'd get those working consistently.
Chedburn [1] Admin Developer
It sounds like we'll be showing all results by DESC by default now, for consistency. However, you can use 'sort=asc' param to change this yourself! Thanks.