Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Implementation #44

Open
hgn opened this issue Jan 13, 2017 · 0 comments
Open

Cache Implementation #44

hgn opened this issue Jan 13, 2017 · 0 comments

Comments

@hgn
Copy link
Member

hgn commented Jan 13, 2017

API

api_cache_tags.py
api_cache_persons.py
api_cache_categories.py
api_cache_anchors.py
api_cache_achievements_stats.py

Persons

return a list of all person in the system of all user databases (manual, ldap database, so merging the content of all databases but exclude john doe(?) default user)
return a list in the following form:

[
{ "nick" : "pfeifer", "full" : "Hagen Paul Pfeifer" },
{ "nick" : "bar", "full" : "Foo Bar" },
]

Anchors

return a list of all available anchors. If this api is called the method do not iterate over all achievements, rather a cache is rebuild every hour. The implementation is done in cache_anchors.py. The cache is stored under /usr/share/hippod/cache/anchors.db

{ "anchor-list" [
   "anchor-1",
   "anchor-2",
   "anchor-3",
   "anchor-99",
]
}

Categories

Similar to anchors

But the return data should be in the following form:

{
  "categories-list" [
   "team:a",
   "team:b",
   "topic:foo",
   "topic:bar",
   "subtopic:qux",
],
"categories-full" [
   ["team:a", "topic:foo" ],
   ["team:b", "topic:bar", "subtopic:qux" ],
] 
}

Tags

Similar to anchors

Return data structure:


{
"tags-list" [
   "tags-1",
   "tags-2",
  ],
"tags-list-usage" [
   { name: "tags-1", "usage": 200 },
   { name: "tags-2", "usage": 3300 },
  ]
}
@hgn hgn added this to the v4.0.0 milestone Jan 13, 2017
@hgn hgn removed this from the v4.0.0 milestone Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants