Commit fb3366e
committed
Merge branch 'feature/GetContentTypeDescriptors-Caching' into develop
Previously, the oroborus configuration—which allows the OnTopic Library to be configured using topics within the OnTopic Library—was optimized for read-only states. A number of changes to the configuration would not take effect until the application had been reset, and the cache cleared. As part of this, it also wasn't well-suited for programmatically persisting topic graphs which included new configuration elements, or bootstrapping a new database, since that would frequently introduce order-of-operations issues—e.g., it can't save a topic of a given content type until the associated `ContentTypeDescriptor` was persisted. So, for example, given a new database, how do you save the `ContentTypeDescriptor` content type without already having the `ContentTypeDescriptor` content type saved?
These issues are largely mitigated by this update, which automatically updates the appropriate caches for the `ContentTypeDescriptor`s (via `TopicRepositoryBase.GetContentTypeDescriptors()`) and `AttributeDescriptor`s (via `ContentTypeDescriptor.AttributeDescriptors`) whenever `ContentTypeDescriptor`s or `AttributeDescriptor`s are `Save()`d, `Delete()`d, or `Move()`d. Further, for complex topic graphs, fallbacks were put in place to automatically search for updates to the `ContentTypeDescriptor`(s) or `AttributeDescriptor`(s) via the in-memory topic graph if they're not found in the currently cached version—and, if they're found, to update the cached versions with the new objects. This provides significantly more flexibility, thus permitting both real time configuration (without application resets) as well as programmatically updating entire topic graphs (as needed for the **OnTopic Data Exchange** library). The bootstrapping problem isn't entirely solved—that requires some additional considerations—but this lays a solid foundation for that effort.
The update resolves the following feature enhancements and bug fixes:
- Update content type cache when adding or removing content types (#16)
- Update attribute descriptors when adding or removing an attribute (#17)
- Discover in-memory ContentTypeDescriptor, AttributeDescriptor on Save() (#18)File tree
7 files changed
+598
-63
lines changed- OnTopic.TestDoubles
- OnTopic.Tests
- OnTopic
- Attributes
- Metadata
- Repositories
7 files changed
+598
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
166 | 194 | | |
167 | 195 | | |
168 | 196 | | |
| |||
183 | 211 | | |
184 | 212 | | |
185 | 213 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
190 | 218 | | |
191 | 219 | | |
192 | 220 | | |
| |||
200 | 228 | | |
201 | 229 | | |
202 | 230 | | |
203 | | - | |
204 | | - | |
| 231 | + | |
| 232 | + | |
205 | 233 | | |
206 | 234 | | |
207 | 235 | | |
| |||
214 | 242 | | |
215 | 243 | | |
216 | 244 | | |
217 | | - | |
218 | | - | |
| 245 | + | |
| 246 | + | |
219 | 247 | | |
220 | 248 | | |
221 | 249 | | |
222 | 250 | | |
223 | 251 | | |
224 | 252 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
228 | 256 | | |
229 | 257 | | |
230 | 258 | | |
231 | 259 | | |
232 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
233 | 267 | | |
234 | 268 | | |
235 | 269 | | |
236 | 270 | | |
237 | 271 | | |
238 | 272 | | |
239 | 273 | | |
| 274 | + | |
240 | 275 | | |
241 | 276 | | |
242 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | 227 | | |
248 | 228 | | |
0 commit comments