Commit 77b44a0
Return default value when entity ttl is retrieved with entity cache enabled set to false (#3156)
## Why make this change?
Closes #3148
Test change to help the pipeline pass relates to
#2992
## What is this change?
Within the code paths for executing a REST request with the
RuntimeCacheOptions enabled, we would attempt to get the entity cache
ttl, however, if the entity had its cache options not enabled this would
result in an exception, leading to a bad request returned to the user.
However, the code path was already safeguarded by checking if we have
entity cache enabled before executing a cache-based response, and so we
did not need the exception when getting the entity cache ttl, and can
safely return null to indicate that there is no cache ttl.
## How was this tested?
A simple regression test is added that validates the new behavior.
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Aniruddh Munde <[email protected]>1 parent b5841fd commit 77b44a0
4 files changed
Lines changed: 71 additions & 35 deletions
File tree
- src
- Config/ObjectModel
- Service.Tests
- Caching
- Configuration
- Telemetry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
| |||
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
532 | | - | |
533 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
| 548 | + | |
557 | 549 | | |
558 | 550 | | |
559 | 551 | | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
| 552 | + | |
| 553 | + | |
564 | 554 | | |
565 | 555 | | |
566 | 556 | | |
567 | 557 | | |
568 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
569 | 561 | | |
570 | 562 | | |
571 | 563 | | |
572 | | - | |
| 564 | + | |
573 | 565 | | |
574 | 566 | | |
575 | 567 | | |
| |||
580 | 572 | | |
581 | 573 | | |
582 | 574 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 575 | + | |
592 | 576 | | |
593 | 577 | | |
594 | 578 | | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
| 579 | + | |
| 580 | + | |
599 | 581 | | |
600 | 582 | | |
601 | 583 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
419 | 463 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2903 | 2903 | | |
2904 | 2904 | | |
2905 | 2905 | | |
2906 | | - | |
| 2906 | + | |
2907 | 2907 | | |
2908 | 2908 | | |
2909 | 2909 | | |
| |||
3225 | 3225 | | |
3226 | 3226 | | |
3227 | 3227 | | |
3228 | | - | |
| 3228 | + | |
3229 | 3229 | | |
3230 | 3230 | | |
3231 | 3231 | | |
| |||
3237 | 3237 | | |
3238 | 3238 | | |
3239 | 3239 | | |
| 3240 | + | |
3240 | 3241 | | |
3241 | 3242 | | |
3242 | 3243 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
0 commit comments