-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Milestone
Description
NODE_CACHE format should be the standard format for our topic tree. It's a much more simple representation, more amenable to editing and fast searching.
The major issue with NODE_CACHE is that it can't be saved easily--parent, parents, and children all have object references that wind up creating loops.
So, here's how to save/load NODE_CACHE to/from disk. Then, TOPICS just becomes NODE_CACHE['Topic'][""]:
- convert
parent,parents, andchildrento slugs before streaming to disk - after loading from disk, convert those slugs into actual object references in a simple loop. Efficient, as lookup in a dict is hashed, so fast.
That's it! Then, editing becomes so easy, to add / edit / delete nodes. No tree structure needed for navigation; just add, setting all properties necessary on the node, and you're done!
Metadata
Metadata
Assignees
Labels
No labels