tasker-engine 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +443 -0
- data/Rakefile +10 -0
- data/app/controllers/tasker/analytics_controller.rb +179 -0
- data/app/controllers/tasker/application_controller.rb +45 -0
- data/app/controllers/tasker/graphql_controller.rb +193 -0
- data/app/controllers/tasker/handlers_controller.rb +217 -0
- data/app/controllers/tasker/health_controller.rb +229 -0
- data/app/controllers/tasker/metrics_controller.rb +111 -0
- data/app/controllers/tasker/page_sort.rb +97 -0
- data/app/controllers/tasker/task_diagrams_controller.rb +30 -0
- data/app/controllers/tasker/tasks_controller.rb +123 -0
- data/app/controllers/tasker/workflow_steps_controller.rb +69 -0
- data/app/graphql/examples/all_tasks.graphql +22 -0
- data/app/graphql/examples/pending_tasks.graphql +23 -0
- data/app/graphql/tasker/graph_ql_types/annotation_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_argument.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_connection.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/base_edge.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_enum.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_field.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_input_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_interface.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_scalar.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_union.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_object_map_type.rb +18 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_type.rb +13 -0
- data/app/graphql/tasker/graph_ql_types/mutation_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_step_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_task_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/named_tasks_named_step_type.rb +19 -0
- data/app/graphql/tasker/graph_ql_types/node_type.rb +12 -0
- data/app/graphql/tasker/graph_ql_types/query_type.rb +20 -0
- data/app/graphql/tasker/graph_ql_types/task_annotation_type.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_interface.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_type.rb +26 -0
- data/app/graphql/tasker/graph_ql_types/workflow_step_type.rb +154 -0
- data/app/graphql/tasker/graph_ql_types.rb +42 -0
- data/app/graphql/tasker/mutations/base_mutation.rb +13 -0
- data/app/graphql/tasker/mutations/cancel_step.rb +29 -0
- data/app/graphql/tasker/mutations/cancel_task.rb +29 -0
- data/app/graphql/tasker/mutations/create_task.rb +52 -0
- data/app/graphql/tasker/mutations/update_step.rb +36 -0
- data/app/graphql/tasker/mutations/update_task.rb +41 -0
- data/app/graphql/tasker/queries/all_annotation_types.rb +17 -0
- data/app/graphql/tasker/queries/all_tasks.rb +23 -0
- data/app/graphql/tasker/queries/base_query.rb +9 -0
- data/app/graphql/tasker/queries/helpers.rb +16 -0
- data/app/graphql/tasker/queries/one_step.rb +24 -0
- data/app/graphql/tasker/queries/one_task.rb +18 -0
- data/app/graphql/tasker/queries/tasks_by_annotation.rb +31 -0
- data/app/graphql/tasker/queries/tasks_by_status.rb +30 -0
- data/app/graphql/tasker/tasker_rails_schema.rb +52 -0
- data/app/jobs/tasker/application_job.rb +8 -0
- data/app/jobs/tasker/metrics_export_job.rb +252 -0
- data/app/jobs/tasker/task_runner_job.rb +224 -0
- data/app/models/tasker/annotation_type.rb +26 -0
- data/app/models/tasker/application_record.rb +70 -0
- data/app/models/tasker/dependent_system.rb +26 -0
- data/app/models/tasker/dependent_system_object_map.rb +64 -0
- data/app/models/tasker/diagram/edge.rb +106 -0
- data/app/models/tasker/diagram/flowchart.rb +137 -0
- data/app/models/tasker/diagram/node.rb +99 -0
- data/app/models/tasker/named_step.rb +41 -0
- data/app/models/tasker/named_task.rb +121 -0
- data/app/models/tasker/named_tasks_named_step.rb +82 -0
- data/app/models/tasker/step_dag_relationship.rb +65 -0
- data/app/models/tasker/step_readiness_status.rb +59 -0
- data/app/models/tasker/task.rb +424 -0
- data/app/models/tasker/task_annotation.rb +36 -0
- data/app/models/tasker/task_diagram.rb +332 -0
- data/app/models/tasker/task_execution_context.rb +29 -0
- data/app/models/tasker/task_namespace.rb +41 -0
- data/app/models/tasker/task_transition.rb +235 -0
- data/app/models/tasker/workflow_step.rb +461 -0
- data/app/models/tasker/workflow_step_edge.rb +94 -0
- data/app/models/tasker/workflow_step_transition.rb +434 -0
- data/app/serializers/tasker/annotation_type_serializer.rb +8 -0
- data/app/serializers/tasker/handler_serializer.rb +109 -0
- data/app/serializers/tasker/task_annotation_serializer.rb +32 -0
- data/app/serializers/tasker/task_serializer.rb +168 -0
- data/app/serializers/tasker/workflow_step_serializer.rb +27 -0
- data/app/services/tasker/analytics_service.rb +409 -0
- data/app/views/tasker/task/_diagram.html.erb +32 -0
- data/config/initializers/dry_struct.rb +11 -0
- data/config/initializers/statesman.rb +6 -0
- data/config/initializers/tasker_orchestration.rb +17 -0
- data/config/initializers/time_formats.rb +4 -0
- data/config/routes.rb +34 -0
- data/config/tasker/subscriptions/example_integrations.yml +67 -0
- data/config/tasker/system_events.yml +305 -0
- data/db/functions/calculate_dependency_levels_v01.sql +45 -0
- data/db/functions/get_analytics_metrics_v01.sql +137 -0
- data/db/functions/get_slowest_steps_v01.sql +82 -0
- data/db/functions/get_slowest_tasks_v01.sql +96 -0
- data/db/functions/get_step_readiness_status_batch_v01.sql +140 -0
- data/db/functions/get_step_readiness_status_v01.sql +139 -0
- data/db/functions/get_system_health_counts_v01.sql +108 -0
- data/db/functions/get_task_execution_context_v01.sql +108 -0
- data/db/functions/get_task_execution_contexts_batch_v01.sql +104 -0
- data/db/init/schema.sql +2277 -0
- data/db/migrate/20250701165431_initial_tasker_schema.rb +116 -0
- data/db/views/tasker_step_dag_relationships_v01.sql +69 -0
- data/docs/APPLICATION_GENERATOR.md +384 -0
- data/docs/AUTH.md +1780 -0
- data/docs/CIRCUIT_BREAKER.md +224 -0
- data/docs/DEVELOPER_GUIDE.md +2665 -0
- data/docs/EVENT_SYSTEM.md +637 -0
- data/docs/EXECUTION_CONFIGURATION.md +341 -0
- data/docs/FLOW_CHART.md +149 -0
- data/docs/HEALTH.md +542 -0
- data/docs/METRICS.md +731 -0
- data/docs/OPTIMIZATION_PLAN.md +1479 -0
- data/docs/OVERVIEW.md +552 -0
- data/docs/QUICK_START.md +270 -0
- data/docs/REGISTRY_SYSTEMS.md +373 -0
- data/docs/REST_API.md +632 -0
- data/docs/ROADMAP.md +221 -0
- data/docs/SQL_FUNCTIONS.md +1408 -0
- data/docs/TASK_DIAGRAM.md +252 -0
- data/docs/TASK_EXECUTION_CONTROL_FLOW.md +237 -0
- data/docs/TELEMETRY.md +795 -0
- data/docs/TROUBLESHOOTING.md +756 -0
- data/docs/TaskHandlerGenerator.html +255 -0
- data/docs/Tasker/Analysis/RuntimeGraphAnalyzer.html +907 -0
- data/docs/Tasker/Analysis/TemplateGraphAnalyzer.html +1236 -0
- data/docs/Tasker/Analysis.html +117 -0
- data/docs/Tasker/AnalyticsController.html +450 -0
- data/docs/Tasker/AnalyticsService/BottleneckAnalytics.html +816 -0
- data/docs/Tasker/AnalyticsService/PerformanceAnalytics.html +586 -0
- data/docs/Tasker/AnalyticsService.html +2221 -0
- data/docs/Tasker/AnnotationType.html +137 -0
- data/docs/Tasker/AnnotationTypeSerializer.html +124 -0
- data/docs/Tasker/ApplicationController.html +147 -0
- data/docs/Tasker/ApplicationJob.html +128 -0
- data/docs/Tasker/ApplicationRecord.html +378 -0
- data/docs/Tasker/Authentication/AuthenticationError.html +124 -0
- data/docs/Tasker/Authentication/ConfigurationError.html +124 -0
- data/docs/Tasker/Authentication/Coordinator.html +242 -0
- data/docs/Tasker/Authentication/Interface.html +560 -0
- data/docs/Tasker/Authentication/InterfaceError.html +124 -0
- data/docs/Tasker/Authentication/NoneAuthenticator.html +338 -0
- data/docs/Tasker/Authentication.html +119 -0
- data/docs/Tasker/Authorization/AuthorizationError.html +139 -0
- data/docs/Tasker/Authorization/BaseCoordinator.html +927 -0
- data/docs/Tasker/Authorization/ConfigurationError.html +153 -0
- data/docs/Tasker/Authorization/ResourceConstants/ACTIONS.html +428 -0
- data/docs/Tasker/Authorization/ResourceConstants/RESOURCES.html +365 -0
- data/docs/Tasker/Authorization/ResourceConstants.html +146 -0
- data/docs/Tasker/Authorization/ResourceRegistry.html +882 -0
- data/docs/Tasker/Authorization/UnauthorizedError.html +153 -0
- data/docs/Tasker/Authorization.html +582 -0
- data/docs/Tasker/CacheCapabilities.html +167 -0
- data/docs/Tasker/CacheStrategy.html +1297 -0
- data/docs/Tasker/Concerns/Authenticatable.html +116 -0
- data/docs/Tasker/Concerns/Authorizable/AdminStatusChecker.html +256 -0
- data/docs/Tasker/Concerns/Authorizable.html +816 -0
- data/docs/Tasker/Concerns/ControllerAuthorizable.html +157 -0
- data/docs/Tasker/Concerns/EventPublisher.html +4023 -0
- data/docs/Tasker/Concerns/IdempotentStateTransitions.html +806 -0
- data/docs/Tasker/Concerns/LifecycleEventHelpers.html +129 -0
- data/docs/Tasker/Concerns/OrchestrationPublisher.html +129 -0
- data/docs/Tasker/Concerns/StateMachineBase/ClassMethods.html +1075 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase/ClassMethods.html +191 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase.html +126 -0
- data/docs/Tasker/Concerns/StateMachineBase.html +153 -0
- data/docs/Tasker/Concerns/StructuredLogging.html +1413 -0
- data/docs/Tasker/Concerns.html +117 -0
- data/docs/Tasker/Configuration/AuthConfiguration.html +1023 -0
- data/docs/Tasker/Configuration/ConfigurationProxy.html +581 -0
- data/docs/Tasker/Configuration/DatabaseConfiguration.html +475 -0
- data/docs/Tasker/Configuration/EngineConfiguration.html +1265 -0
- data/docs/Tasker/Configuration/HealthConfiguration.html +791 -0
- data/docs/Tasker/Configuration/TelemetryConfiguration.html +1308 -0
- data/docs/Tasker/Configuration/TelemetryConfigurationProxy.html +388 -0
- data/docs/Tasker/Configuration.html +1669 -0
- data/docs/Tasker/ConfigurationError.html +143 -0
- data/docs/Tasker/ConfiguredTask.html +514 -0
- data/docs/Tasker/Constants/EventDefinitions.html +590 -0
- data/docs/Tasker/Constants/LifecycleEvents.html +137 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Step.html +152 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Task.html +142 -0
- data/docs/Tasker/Constants/ObservabilityEvents.html +126 -0
- data/docs/Tasker/Constants/RegistryEvents.html +285 -0
- data/docs/Tasker/Constants/StepEvents.html +177 -0
- data/docs/Tasker/Constants/TaskEvents.html +167 -0
- data/docs/Tasker/Constants/TaskExecution/ExecutionStatus.html +207 -0
- data/docs/Tasker/Constants/TaskExecution/HealthStatus.html +191 -0
- data/docs/Tasker/Constants/TaskExecution/RecommendedAction.html +207 -0
- data/docs/Tasker/Constants/TaskExecution.html +126 -0
- data/docs/Tasker/Constants/TaskFinalization/ErrorMessages.html +132 -0
- data/docs/Tasker/Constants/TaskFinalization/PendingReasons.html +207 -0
- data/docs/Tasker/Constants/TaskFinalization/ReenqueueReasons.html +239 -0
- data/docs/Tasker/Constants/TaskFinalization.html +126 -0
- data/docs/Tasker/Constants/TaskStatuses.html +223 -0
- data/docs/Tasker/Constants/TestEvents.html +163 -0
- data/docs/Tasker/Constants/WorkflowEvents.html +222 -0
- data/docs/Tasker/Constants/WorkflowStepStatuses.html +223 -0
- data/docs/Tasker/Constants.html +561 -0
- data/docs/Tasker/DependentSystem.html +137 -0
- data/docs/Tasker/DependentSystemObjectMap.html +250 -0
- data/docs/Tasker/DetectorRegistry.html +598 -0
- data/docs/Tasker/Diagram/Edge.html +1191 -0
- data/docs/Tasker/Diagram/Flowchart.html +1539 -0
- data/docs/Tasker/Diagram/Node.html +1165 -0
- data/docs/Tasker/Diagram.html +117 -0
- data/docs/Tasker/Engine.html +215 -0
- data/docs/Tasker/Error.html +139 -0
- data/docs/Tasker/Events/Bus.html +1226 -0
- data/docs/Tasker/Events/Catalog/CatalogPrinter.html +258 -0
- data/docs/Tasker/Events/Catalog/CustomEventRegistrar.html +276 -0
- data/docs/Tasker/Events/Catalog/ExamplePayloadGenerator.html +294 -0
- data/docs/Tasker/Events/Catalog.html +1291 -0
- data/docs/Tasker/Events/CustomRegistry.html +943 -0
- data/docs/Tasker/Events/DefinitionLoader.html +575 -0
- data/docs/Tasker/Events/EventPayloadBuilder/ErrorInfoExtractor.html +286 -0
- data/docs/Tasker/Events/EventPayloadBuilder/StepPayloadBuilder.html +312 -0
- data/docs/Tasker/Events/EventPayloadBuilder.html +664 -0
- data/docs/Tasker/Events/Publisher.html +365 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer/ErrorTypeClassifier.html +1128 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer.html +270 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/MetricTagsExtractor.html +266 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber.html +2556 -0
- data/docs/Tasker/Events/Subscribers/MetricsSubscriber.html +723 -0
- data/docs/Tasker/Events/Subscribers/TelemetrySubscriber.html +2251 -0
- data/docs/Tasker/Events/Subscribers.html +117 -0
- data/docs/Tasker/Events/SubscriptionLoader.html +493 -0
- data/docs/Tasker/Events.html +294 -0
- data/docs/Tasker/EventsGenerator.html +459 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics/AnalyticsMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics.html +412 -0
- data/docs/Tasker/Functions/FunctionBasedDependencyLevels.html +598 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps/SlowestStep.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks/SlowestTask.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedStepReadinessStatus.html +1457 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts/HealthMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts.html +370 -0
- data/docs/Tasker/Functions/FunctionBasedTaskExecutionContext.html +1250 -0
- data/docs/Tasker/Functions/FunctionWrapper.html +479 -0
- data/docs/Tasker/Functions.html +117 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator/UsageInstructionsFormatter.html +244 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator.html +373 -0
- data/docs/Tasker/Generators/AuthorizationCoordinatorGenerator.html +430 -0
- data/docs/Tasker/Generators/SubscriberGenerator.html +377 -0
- data/docs/Tasker/Generators/TaskHandlerGenerator.html +263 -0
- data/docs/Tasker/Generators.html +117 -0
- data/docs/Tasker/GraphQLTypes/AnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/BaseArgument.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseConnection.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseEdge.html +130 -0
- data/docs/Tasker/GraphQLTypes/BaseEnum.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseField.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInputObject.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInterface.html +116 -0
- data/docs/Tasker/GraphQLTypes/BaseObject.html +128 -0
- data/docs/Tasker/GraphQLTypes/BaseScalar.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseUnion.html +124 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemObjectMapType.html +132 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemType.html +132 -0
- data/docs/Tasker/GraphQLTypes/MutationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTaskType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTasksNamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NodeType.html +118 -0
- data/docs/Tasker/GraphQLTypes/QueryType.html +139 -0
- data/docs/Tasker/GraphQLTypes/TaskAnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/TaskInterface.html +111 -0
- data/docs/Tasker/GraphQLTypes/TaskType.html +201 -0
- data/docs/Tasker/GraphQLTypes/WorkflowStepType.html +694 -0
- data/docs/Tasker/GraphQLTypes.html +130 -0
- data/docs/Tasker/GraphqlController.html +251 -0
- data/docs/Tasker/HandlerFactory.html +1518 -0
- data/docs/Tasker/HandlerSerializer.html +682 -0
- data/docs/Tasker/HandlersController.html +574 -0
- data/docs/Tasker/HashIdentityStrategy.html +278 -0
- data/docs/Tasker/Health/ReadinessChecker.html +712 -0
- data/docs/Tasker/Health/StatusChecker.html +653 -0
- data/docs/Tasker/Health.html +117 -0
- data/docs/Tasker/HealthController.html +523 -0
- data/docs/Tasker/IdentityStrategy.html +276 -0
- data/docs/Tasker/InvalidTaskHandlerConfig.html +135 -0
- data/docs/Tasker/LifecycleEvents/Events/Step.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events/Task.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events.html +204 -0
- data/docs/Tasker/LifecycleEvents/Publisher.html +132 -0
- data/docs/Tasker/LifecycleEvents.html +799 -0
- data/docs/Tasker/Logging/CorrelationIdGenerator.html +688 -0
- data/docs/Tasker/Logging.html +115 -0
- data/docs/Tasker/MetricsController.html +293 -0
- data/docs/Tasker/MetricsExportJob.html +414 -0
- data/docs/Tasker/Mutations/BaseMutation.html +128 -0
- data/docs/Tasker/Mutations/CancelStep.html +219 -0
- data/docs/Tasker/Mutations/CancelTask.html +221 -0
- data/docs/Tasker/Mutations/CreateTask.html +243 -0
- data/docs/Tasker/Mutations/UpdateStep.html +243 -0
- data/docs/Tasker/Mutations/UpdateTask.html +243 -0
- data/docs/Tasker/Mutations.html +117 -0
- data/docs/Tasker/NamedStep.html +216 -0
- data/docs/Tasker/NamedTask.html +910 -0
- data/docs/Tasker/NamedTasksNamedStep.html +435 -0
- data/docs/Tasker/Orchestration/BackoffCalculator.html +404 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder/ConfigValidator.html +258 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder.html +435 -0
- data/docs/Tasker/Orchestration/ConnectionPoolIntelligence.html +513 -0
- data/docs/Tasker/Orchestration/Coordinator.html +641 -0
- data/docs/Tasker/Orchestration/FutureStateAnalyzer.html +1045 -0
- data/docs/Tasker/Orchestration/Orchestrator.html +679 -0
- data/docs/Tasker/Orchestration/PluginIntegration.html +1127 -0
- data/docs/Tasker/Orchestration/ResponseProcessor.html +504 -0
- data/docs/Tasker/Orchestration/RetryHeaderParser.html +304 -0
- data/docs/Tasker/Orchestration/StepExecutor.html +995 -0
- data/docs/Tasker/Orchestration/StepSequenceFactory.html +644 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/BlockageChecker.html +264 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ContextManager.html +254 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/DelayCalculator.html +556 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationDecisionMaker.html +348 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationProcessor.html +286 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReasonDeterminer.html +432 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReenqueueManager.html +296 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/UnclearStateHandler.html +314 -0
- data/docs/Tasker/Orchestration/TaskFinalizer.html +1212 -0
- data/docs/Tasker/Orchestration/TaskInitializer.html +766 -0
- data/docs/Tasker/Orchestration/TaskReenqueuer.html +506 -0
- data/docs/Tasker/Orchestration/ViableStepDiscovery.html +442 -0
- data/docs/Tasker/Orchestration/WorkflowCoordinator.html +510 -0
- data/docs/Tasker/Orchestration.html +130 -0
- data/docs/Tasker/PageSort/PageSortParamsBuilder.html +296 -0
- data/docs/Tasker/PageSort.html +247 -0
- data/docs/Tasker/PermanentError.html +518 -0
- data/docs/Tasker/ProceduralError.html +147 -0
- data/docs/Tasker/Queries/AllAnnotationTypes.html +217 -0
- data/docs/Tasker/Queries/AllTasks.html +221 -0
- data/docs/Tasker/Queries/BaseQuery.html +128 -0
- data/docs/Tasker/Queries/Helpers.html +187 -0
- data/docs/Tasker/Queries/OneStep.html +225 -0
- data/docs/Tasker/Queries/OneTask.html +217 -0
- data/docs/Tasker/Queries/TasksByAnnotation.html +231 -0
- data/docs/Tasker/Queries/TasksByStatus.html +233 -0
- data/docs/Tasker/Queries.html +119 -0
- data/docs/Tasker/Railtie.html +124 -0
- data/docs/Tasker/Registry/BaseRegistry.html +1690 -0
- data/docs/Tasker/Registry/EventPublisher.html +667 -0
- data/docs/Tasker/Registry/InterfaceValidator.html +569 -0
- data/docs/Tasker/Registry/RegistrationError.html +132 -0
- data/docs/Tasker/Registry/RegistryError.html +139 -0
- data/docs/Tasker/Registry/StatisticsCollector.html +841 -0
- data/docs/Tasker/Registry/SubscriberRegistry.html +1504 -0
- data/docs/Tasker/Registry/ValidationError.html +132 -0
- data/docs/Tasker/Registry.html +119 -0
- data/docs/Tasker/RetryableError.html +515 -0
- data/docs/Tasker/StateMachine/Compatibility.html +282 -0
- data/docs/Tasker/StateMachine/InvalidStateTransition.html +135 -0
- data/docs/Tasker/StateMachine/StepStateMachine/StandardizedPayloadBuilder.html +260 -0
- data/docs/Tasker/StateMachine/StepStateMachine.html +2215 -0
- data/docs/Tasker/StateMachine/TaskStateMachine.html +734 -0
- data/docs/Tasker/StateMachine.html +602 -0
- data/docs/Tasker/StepDagRelationship.html +657 -0
- data/docs/Tasker/StepHandler/Api/Config.html +1091 -0
- data/docs/Tasker/StepHandler/Api.html +884 -0
- data/docs/Tasker/StepHandler/AutomaticEventPublishing.html +321 -0
- data/docs/Tasker/StepHandler/Base.html +970 -0
- data/docs/Tasker/StepHandler.html +119 -0
- data/docs/Tasker/StepReadinessStatus.html +836 -0
- data/docs/Tasker/Task.html +2575 -0
- data/docs/Tasker/TaskAnnotation.html +137 -0
- data/docs/Tasker/TaskAnnotationSerializer.html +124 -0
- data/docs/Tasker/TaskBuilder/StepNameValidator.html +264 -0
- data/docs/Tasker/TaskBuilder/StepTemplateDefiner.html +264 -0
- data/docs/Tasker/TaskBuilder.html +764 -0
- data/docs/Tasker/TaskDiagram/StepToStepEdgeBuilder.html +260 -0
- data/docs/Tasker/TaskDiagram/TaskToRootStepEdgeBuilder.html +290 -0
- data/docs/Tasker/TaskDiagram.html +548 -0
- data/docs/Tasker/TaskDiagramsController.html +240 -0
- data/docs/Tasker/TaskExecutionContext.html +469 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/ClassBasedEventRegistrar.html +238 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/YamlEventRegistrar.html +254 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner.html +988 -0
- data/docs/Tasker/TaskHandler/ClassMethods.html +357 -0
- data/docs/Tasker/TaskHandler/InstanceMethods.html +1396 -0
- data/docs/Tasker/TaskHandler/StepGroup.html +1748 -0
- data/docs/Tasker/TaskHandler.html +271 -0
- data/docs/Tasker/TaskNamespace.html +312 -0
- data/docs/Tasker/TaskRunnerJob.html +406 -0
- data/docs/Tasker/TaskSerializer.html +474 -0
- data/docs/Tasker/TaskTransition.html +1517 -0
- data/docs/Tasker/TaskWorkflowSummary.html +988 -0
- data/docs/Tasker/TaskerRailsSchema/InvalidObjectTypeError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema/TypeResolutionError.html +139 -0
- data/docs/Tasker/TaskerRailsSchema/UnknownInterfaceError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema.html +384 -0
- data/docs/Tasker/TasksController.html +595 -0
- data/docs/Tasker/Telemetry/EventMapping.html +1307 -0
- data/docs/Tasker/Telemetry/EventRouter.html +2178 -0
- data/docs/Tasker/Telemetry/Events/ExportEvents.html +246 -0
- data/docs/Tasker/Telemetry/Events.html +115 -0
- data/docs/Tasker/Telemetry/ExportCoordinator/DistributedLockTimeoutError.html +135 -0
- data/docs/Tasker/Telemetry/ExportCoordinator.html +2137 -0
- data/docs/Tasker/Telemetry/IntelligentCacheManager.html +1083 -0
- data/docs/Tasker/Telemetry/LogBackend.html +1088 -0
- data/docs/Tasker/Telemetry/MetricTypes/Counter.html +1054 -0
- data/docs/Tasker/Telemetry/MetricTypes/Gauge.html +1270 -0
- data/docs/Tasker/Telemetry/MetricTypes/Histogram.html +1492 -0
- data/docs/Tasker/Telemetry/MetricTypes.html +153 -0
- data/docs/Tasker/Telemetry/MetricsBackend.html +2510 -0
- data/docs/Tasker/Telemetry/MetricsExportService.html +578 -0
- data/docs/Tasker/Telemetry/PluginRegistry.html +1774 -0
- data/docs/Tasker/Telemetry/Plugins/BaseExporter.html +1835 -0
- data/docs/Tasker/Telemetry/Plugins/CsvExporter.html +768 -0
- data/docs/Tasker/Telemetry/Plugins/JsonExporter.html +747 -0
- data/docs/Tasker/Telemetry/Plugins.html +117 -0
- data/docs/Tasker/Telemetry/PrometheusExporter.html +481 -0
- data/docs/Tasker/Telemetry/TraceBackend.html +891 -0
- data/docs/Tasker/Telemetry.html +130 -0
- data/docs/Tasker/Types/AuthConfig.html +886 -0
- data/docs/Tasker/Types/BackoffConfig.html +1063 -0
- data/docs/Tasker/Types/BaseConfig.html +227 -0
- data/docs/Tasker/Types/CacheConfig.html +1731 -0
- data/docs/Tasker/Types/DatabaseConfig.html +388 -0
- data/docs/Tasker/Types/DependencyGraph.html +526 -0
- data/docs/Tasker/Types/DependencyGraphConfig.html +753 -0
- data/docs/Tasker/Types/EngineConfig.html +1181 -0
- data/docs/Tasker/Types/ExecutionConfig.html +1963 -0
- data/docs/Tasker/Types/GraphEdge.html +517 -0
- data/docs/Tasker/Types/GraphMetadata.html +781 -0
- data/docs/Tasker/Types/GraphNode.html +694 -0
- data/docs/Tasker/Types/HealthConfig.html +784 -0
- data/docs/Tasker/Types/StepSequence.html +353 -0
- data/docs/Tasker/Types/StepTemplate.html +1193 -0
- data/docs/Tasker/Types/TaskRequest.html +1179 -0
- data/docs/Tasker/Types/TelemetryConfig.html +2746 -0
- data/docs/Tasker/Types.html +154 -0
- data/docs/Tasker/WorkflowStep/StepFinder.html +282 -0
- data/docs/Tasker/WorkflowStep.html +2724 -0
- data/docs/Tasker/WorkflowStepEdge.html +304 -0
- data/docs/Tasker/WorkflowStepSerializer.html +305 -0
- data/docs/Tasker/WorkflowStepTransition/TransitionDescriptionFormatter.html +282 -0
- data/docs/Tasker/WorkflowStepTransition.html +2201 -0
- data/docs/Tasker/WorkflowStepsController.html +462 -0
- data/docs/Tasker.html +452 -0
- data/docs/VISION.md +584 -0
- data/docs/WHY.md +21 -0
- data/docs/_index.html +2375 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/events/migration_plan_outcomes.md +80 -0
- data/docs/file.README.html +541 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +541 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +9182 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/generators/tasker/authenticator_generator.rb +301 -0
- data/lib/generators/tasker/authorization_coordinator_generator.rb +139 -0
- data/lib/generators/tasker/events_generator.rb +91 -0
- data/lib/generators/tasker/subscriber_generator.rb +107 -0
- data/lib/generators/tasker/task_handler_generator.rb +138 -0
- data/lib/generators/tasker/templates/api_token_authenticator.rb.erb +113 -0
- data/lib/generators/tasker/templates/api_token_authenticator_spec.rb.erb +144 -0
- data/lib/generators/tasker/templates/authorization_coordinator.rb.erb +95 -0
- data/lib/generators/tasker/templates/authorization_coordinator_spec.rb.erb +142 -0
- data/lib/generators/tasker/templates/custom_authenticator.rb.erb +108 -0
- data/lib/generators/tasker/templates/custom_authenticator_spec.rb.erb +162 -0
- data/lib/generators/tasker/templates/custom_events.yml.erb +62 -0
- data/lib/generators/tasker/templates/custom_subscriber.rb.erb +72 -0
- data/lib/generators/tasker/templates/devise_authenticator.rb.erb +101 -0
- data/lib/generators/tasker/templates/devise_authenticator_spec.rb.erb +126 -0
- data/lib/generators/tasker/templates/initialize.rb.erb +202 -0
- data/lib/generators/tasker/templates/jwt_authenticator.rb.erb +144 -0
- data/lib/generators/tasker/templates/jwt_authenticator_spec.rb.erb +298 -0
- data/lib/generators/tasker/templates/metrics_subscriber.rb.erb +258 -0
- data/lib/generators/tasker/templates/metrics_subscriber_spec.rb.erb +308 -0
- data/lib/generators/tasker/templates/omniauth_authenticator.rb.erb +135 -0
- data/lib/generators/tasker/templates/omniauth_authenticator_spec.rb.erb +196 -0
- data/lib/generators/tasker/templates/opentelemetry_initializer.rb +52 -0
- data/lib/generators/tasker/templates/subscriber.rb.erb +64 -0
- data/lib/generators/tasker/templates/subscriber_spec.rb.erb +80 -0
- data/lib/generators/tasker/templates/task_config.yaml.erb +117 -0
- data/lib/generators/tasker/templates/task_handler.rb.erb +59 -0
- data/lib/generators/tasker/templates/task_handler_spec.rb.erb +159 -0
- data/lib/tasker/analysis/runtime_graph_analyzer.rb +1168 -0
- data/lib/tasker/analysis/template_graph_analyzer.rb +328 -0
- data/lib/tasker/authentication/coordinator.rb +78 -0
- data/lib/tasker/authentication/errors.rb +9 -0
- data/lib/tasker/authentication/interface.rb +36 -0
- data/lib/tasker/authentication/none_authenticator.rb +26 -0
- data/lib/tasker/authorization/base_coordinator.rb +112 -0
- data/lib/tasker/authorization/errors.rb +26 -0
- data/lib/tasker/authorization/resource_constants.rb +74 -0
- data/lib/tasker/authorization/resource_registry.rb +143 -0
- data/lib/tasker/authorization.rb +75 -0
- data/lib/tasker/cache_capabilities.rb +131 -0
- data/lib/tasker/cache_strategy.rb +469 -0
- data/lib/tasker/concerns/authenticatable.rb +41 -0
- data/lib/tasker/concerns/authorizable.rb +204 -0
- data/lib/tasker/concerns/controller_authorizable.rb +124 -0
- data/lib/tasker/concerns/event_publisher.rb +716 -0
- data/lib/tasker/concerns/idempotent_state_transitions.rb +128 -0
- data/lib/tasker/concerns/state_machine_base.rb +218 -0
- data/lib/tasker/concerns/structured_logging.rb +387 -0
- data/lib/tasker/configuration.rb +325 -0
- data/lib/tasker/constants/event_definitions.rb +147 -0
- data/lib/tasker/constants/registry_events.rb +54 -0
- data/lib/tasker/constants.rb +417 -0
- data/lib/tasker/engine.rb +90 -0
- data/lib/tasker/errors.rb +90 -0
- data/lib/tasker/events/catalog.rb +432 -0
- data/lib/tasker/events/custom_registry.rb +175 -0
- data/lib/tasker/events/definition_loader.rb +199 -0
- data/lib/tasker/events/event_payload_builder.rb +461 -0
- data/lib/tasker/events/publisher.rb +149 -0
- data/lib/tasker/events/subscribers/base_subscriber.rb +601 -0
- data/lib/tasker/events/subscribers/metrics_subscriber.rb +120 -0
- data/lib/tasker/events/subscribers/telemetry_subscriber.rb +462 -0
- data/lib/tasker/events/subscription_loader.rb +161 -0
- data/lib/tasker/events.rb +37 -0
- data/lib/tasker/functions/function_based_analytics_metrics.rb +103 -0
- data/lib/tasker/functions/function_based_dependency_levels.rb +54 -0
- data/lib/tasker/functions/function_based_slowest_steps.rb +84 -0
- data/lib/tasker/functions/function_based_slowest_tasks.rb +84 -0
- data/lib/tasker/functions/function_based_step_readiness_status.rb +183 -0
- data/lib/tasker/functions/function_based_system_health_counts.rb +94 -0
- data/lib/tasker/functions/function_based_task_execution_context.rb +148 -0
- data/lib/tasker/functions/function_wrapper.rb +42 -0
- data/lib/tasker/functions.rb +12 -0
- data/lib/tasker/handler_factory.rb +322 -0
- data/lib/tasker/health/readiness_checker.rb +186 -0
- data/lib/tasker/health/status_checker.rb +203 -0
- data/lib/tasker/identity_strategy.rb +38 -0
- data/lib/tasker/logging/correlation_id_generator.rb +120 -0
- data/lib/tasker/orchestration/backoff_calculator.rb +184 -0
- data/lib/tasker/orchestration/connection_builder.rb +122 -0
- data/lib/tasker/orchestration/connection_pool_intelligence.rb +177 -0
- data/lib/tasker/orchestration/coordinator.rb +119 -0
- data/lib/tasker/orchestration/future_state_analyzer.rb +137 -0
- data/lib/tasker/orchestration/plugin_integration.rb +124 -0
- data/lib/tasker/orchestration/response_processor.rb +168 -0
- data/lib/tasker/orchestration/retry_header_parser.rb +78 -0
- data/lib/tasker/orchestration/step_executor.rb +941 -0
- data/lib/tasker/orchestration/step_sequence_factory.rb +67 -0
- data/lib/tasker/orchestration/task_finalizer.rb +564 -0
- data/lib/tasker/orchestration/task_initializer.rb +140 -0
- data/lib/tasker/orchestration/task_reenqueuer.rb +71 -0
- data/lib/tasker/orchestration/viable_step_discovery.rb +65 -0
- data/lib/tasker/orchestration/workflow_coordinator.rb +294 -0
- data/lib/tasker/orchestration.rb +45 -0
- data/lib/tasker/railtie.rb +9 -0
- data/lib/tasker/registry/base_registry.rb +177 -0
- data/lib/tasker/registry/event_publisher.rb +91 -0
- data/lib/tasker/registry/interface_validator.rb +140 -0
- data/lib/tasker/registry/statistics_collector.rb +381 -0
- data/lib/tasker/registry/subscriber_registry.rb +285 -0
- data/lib/tasker/registry.rb +22 -0
- data/lib/tasker/state_machine/step_state_machine.rb +508 -0
- data/lib/tasker/state_machine/task_state_machine.rb +192 -0
- data/lib/tasker/state_machine.rb +83 -0
- data/lib/tasker/step_handler/api.rb +410 -0
- data/lib/tasker/step_handler/base.rb +206 -0
- data/lib/tasker/task_builder.rb +432 -0
- data/lib/tasker/task_handler/class_methods.rb +324 -0
- data/lib/tasker/task_handler/instance_methods.rb +293 -0
- data/lib/tasker/task_handler/step_group.rb +182 -0
- data/lib/tasker/task_handler.rb +43 -0
- data/lib/tasker/telemetry/event_mapping.rb +126 -0
- data/lib/tasker/telemetry/event_router.rb +318 -0
- data/lib/tasker/telemetry/events/export_events.rb +38 -0
- data/lib/tasker/telemetry/export_coordinator.rb +497 -0
- data/lib/tasker/telemetry/intelligent_cache_manager.rb +508 -0
- data/lib/tasker/telemetry/log_backend.rb +224 -0
- data/lib/tasker/telemetry/metric_types.rb +368 -0
- data/lib/tasker/telemetry/metrics_backend.rb +1227 -0
- data/lib/tasker/telemetry/metrics_export_service.rb +392 -0
- data/lib/tasker/telemetry/plugin_registry.rb +333 -0
- data/lib/tasker/telemetry/plugins/base_exporter.rb +246 -0
- data/lib/tasker/telemetry/plugins/csv_exporter.rb +198 -0
- data/lib/tasker/telemetry/plugins/json_exporter.rb +141 -0
- data/lib/tasker/telemetry/prometheus_exporter.rb +249 -0
- data/lib/tasker/telemetry/trace_backend.rb +186 -0
- data/lib/tasker/telemetry.rb +59 -0
- data/lib/tasker/types/auth_config.rb +81 -0
- data/lib/tasker/types/backoff_config.rb +142 -0
- data/lib/tasker/types/cache_config.rb +257 -0
- data/lib/tasker/types/database_config.rb +39 -0
- data/lib/tasker/types/dependency_graph.rb +225 -0
- data/lib/tasker/types/dependency_graph_config.rb +149 -0
- data/lib/tasker/types/engine_config.rb +131 -0
- data/lib/tasker/types/execution_config.rb +289 -0
- data/lib/tasker/types/health_config.rb +84 -0
- data/lib/tasker/types/step_sequence.rb +24 -0
- data/lib/tasker/types/step_template.rb +63 -0
- data/lib/tasker/types/task_request.rb +60 -0
- data/lib/tasker/types/telemetry_config.rb +273 -0
- data/lib/tasker/types.rb +64 -0
- data/lib/tasker/version.rb +7 -0
- data/lib/tasker.rb +82 -0
- data/lib/tasks/tasker_tasks.rake +302 -0
- metadata +958 -0
@@ -0,0 +1,1731 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Tasker::Types::CacheConfig
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Tasker::Types::CacheConfig";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span> » <span class='title'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">CacheConfig</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Tasker::Types::CacheConfig
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="BaseConfig.html" title="Tasker::Types::BaseConfig (class)">BaseConfig</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Dry::Struct</li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="BaseConfig.html" title="Tasker::Types::BaseConfig (class)">BaseConfig</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">Tasker::Types::CacheConfig</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>lib/tasker/types/cache_config.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
107
|
+
<div class="discussion">
|
108
|
+
|
109
|
+
<p>Configuration type for intelligent cache strategy settings</p>
|
110
|
+
|
111
|
+
<p>This configuration provides strategic control over cache behavior while maintaining consistent infrastructure naming through constants.</p>
|
112
|
+
|
113
|
+
<p>Strategic Design: - CONFIGURABLE: Algorithm parameters that vary by workload characteristics - CONFIGURABLE: Performance thresholds that vary by deployment environment - CONSTANTS: Infrastructure naming for consistency across deployments</p>
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
<div class="tags">
|
119
|
+
|
120
|
+
<div class="examples">
|
121
|
+
<h4 class="tag_title">Examples:</h4>
|
122
|
+
|
123
|
+
|
124
|
+
<h5 class="example_title"><div class='inline'>
|
125
|
+
<p>Basic usage</p>
|
126
|
+
</div></h5>
|
127
|
+
|
128
|
+
<pre class="example code"><code><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'>CacheConfig</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
129
|
+
<span class='label'>default_ttl:</span> <span class='int'>600</span><span class='comma'>,</span> <span class='comment'># 10 minutes for stable data
|
130
|
+
</span> <span class='label'>hit_rate_smoothing_factor:</span> <span class='float'>0.8</span> <span class='comment'># Less aggressive smoothing
|
131
|
+
</span><span class='rparen'>)</span></code></pre>
|
132
|
+
|
133
|
+
|
134
|
+
<h5 class="example_title"><div class='inline'>
|
135
|
+
<p>Environment-specific tuning</p>
|
136
|
+
</div></h5>
|
137
|
+
|
138
|
+
<pre class="example code"><code><span class='comment'># Development environment - shorter TTLs for rapid iteration
|
139
|
+
</span><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'>CacheConfig</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
140
|
+
<span class='label'>default_ttl:</span> <span class='int'>120</span><span class='comma'>,</span> <span class='comment'># 2 minutes
|
141
|
+
</span> <span class='label'>adaptive_ttl_enabled:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='comment'># Disable complexity
|
142
|
+
</span> <span class='label'>performance_tracking_enabled:</span> <span class='kw'>false</span> <span class='comment'># Reduce overhead
|
143
|
+
</span><span class='rparen'>)</span>
|
144
|
+
|
145
|
+
<span class='comment'># Production environment - optimized for performance
|
146
|
+
</span><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'>CacheConfig</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
147
|
+
<span class='label'>default_ttl:</span> <span class='int'>300</span><span class='comma'>,</span> <span class='comment'># 5 minutes
|
148
|
+
</span> <span class='label'>hit_rate_smoothing_factor:</span> <span class='float'>0.95</span><span class='comma'>,</span> <span class='comment'># Aggressive smoothing
|
149
|
+
</span> <span class='label'>access_frequency_decay_rate:</span> <span class='float'>0.98</span><span class='comma'>,</span> <span class='comment'># Slow decay
|
150
|
+
</span> <span class='label'>adaptive_ttl_enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='comment'># Enable intelligence
|
151
|
+
</span> <span class='label'>performance_tracking_enabled:</span> <span class='kw'>true</span> <span class='comment'># Full observability
|
152
|
+
</span><span class='rparen'>)</span>
|
153
|
+
|
154
|
+
<span class='comment'># High-performance environment - maximum efficiency
|
155
|
+
</span><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'>CacheConfig</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
156
|
+
<span class='label'>default_ttl:</span> <span class='int'>600</span><span class='comma'>,</span> <span class='comment'># 10 minutes
|
157
|
+
</span> <span class='label'>min_adaptive_ttl:</span> <span class='int'>60</span><span class='comma'>,</span> <span class='comment'># 1 minute minimum
|
158
|
+
</span> <span class='label'>max_adaptive_ttl:</span> <span class='int'>7200</span><span class='comma'>,</span> <span class='comment'># 2 hours maximum
|
159
|
+
</span> <span class='label'>cache_pressure_threshold:</span> <span class='float'>0.9</span><span class='comma'>,</span> <span class='comment'># High threshold
|
160
|
+
</span> <span class='label'>adaptive_calculation_interval:</span> <span class='int'>15</span> <span class='comment'># Frequent recalculation
|
161
|
+
</span><span class='rparen'>)</span></code></pre>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
171
|
+
<ul class="summary">
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#access_frequency_decay_rate-instance_method" title="#access_frequency_decay_rate (instance method)">#<strong>access_frequency_decay_rate</strong> ⇒ Float </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<span class="note title readonly">readonly</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
196
|
+
<p>Decay rate (default: 0.95).</p>
|
197
|
+
</div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
<li class="public ">
|
203
|
+
<span class="summary_signature">
|
204
|
+
|
205
|
+
<a href="#adaptive_calculation_interval-instance_method" title="#adaptive_calculation_interval (instance method)">#<strong>adaptive_calculation_interval</strong> ⇒ Integer </a>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</span>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
<span class="note title readonly">readonly</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<span class="summary_desc"><div class='inline'>
|
225
|
+
<p>Calculation interval in seconds (default: 30).</p>
|
226
|
+
</div></span>
|
227
|
+
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="public ">
|
232
|
+
<span class="summary_signature">
|
233
|
+
|
234
|
+
<a href="#adaptive_ttl_enabled-instance_method" title="#adaptive_ttl_enabled (instance method)">#<strong>adaptive_ttl_enabled</strong> ⇒ Boolean </a>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
</span>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="note title readonly">readonly</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
<span class="summary_desc"><div class='inline'>
|
254
|
+
<p>Whether adaptive TTL is enabled (default: true).</p>
|
255
|
+
</div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
<li class="public ">
|
261
|
+
<span class="summary_signature">
|
262
|
+
|
263
|
+
<a href="#cache_pressure_threshold-instance_method" title="#cache_pressure_threshold (instance method)">#<strong>cache_pressure_threshold</strong> ⇒ Float </a>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</span>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
<span class="note title readonly">readonly</span>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<span class="summary_desc"><div class='inline'>
|
283
|
+
<p>Pressure threshold (default: 0.8).</p>
|
284
|
+
</div></span>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
|
289
|
+
<li class="public ">
|
290
|
+
<span class="summary_signature">
|
291
|
+
|
292
|
+
<a href="#dashboard_cache_ttl-instance_method" title="#dashboard_cache_ttl (instance method)">#<strong>dashboard_cache_ttl</strong> ⇒ Integer </a>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="note title readonly">readonly</span>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
<span class="summary_desc"><div class='inline'>
|
312
|
+
<p>Dashboard TTL in seconds (default: 120).</p>
|
313
|
+
</div></span>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
|
318
|
+
<li class="public ">
|
319
|
+
<span class="summary_signature">
|
320
|
+
|
321
|
+
<a href="#default_ttl-instance_method" title="#default_ttl (instance method)">#<strong>default_ttl</strong> ⇒ Integer </a>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
</span>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
<span class="note title readonly">readonly</span>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<span class="summary_desc"><div class='inline'>
|
341
|
+
<p>Default TTL in seconds (default: 300).</p>
|
342
|
+
</div></span>
|
343
|
+
|
344
|
+
</li>
|
345
|
+
|
346
|
+
|
347
|
+
<li class="public ">
|
348
|
+
<span class="summary_signature">
|
349
|
+
|
350
|
+
<a href="#hit_rate_smoothing_factor-instance_method" title="#hit_rate_smoothing_factor (instance method)">#<strong>hit_rate_smoothing_factor</strong> ⇒ Float </a>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
</span>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
<span class="note title readonly">readonly</span>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<span class="summary_desc"><div class='inline'>
|
370
|
+
<p>Smoothing factor (default: 0.9).</p>
|
371
|
+
</div></span>
|
372
|
+
|
373
|
+
</li>
|
374
|
+
|
375
|
+
|
376
|
+
<li class="public ">
|
377
|
+
<span class="summary_signature">
|
378
|
+
|
379
|
+
<a href="#max_adaptive_ttl-instance_method" title="#max_adaptive_ttl (instance method)">#<strong>max_adaptive_ttl</strong> ⇒ Integer </a>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</span>
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<span class="note title readonly">readonly</span>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
<span class="summary_desc"><div class='inline'>
|
399
|
+
<p>Maximum TTL in seconds (default: 3600).</p>
|
400
|
+
</div></span>
|
401
|
+
|
402
|
+
</li>
|
403
|
+
|
404
|
+
|
405
|
+
<li class="public ">
|
406
|
+
<span class="summary_signature">
|
407
|
+
|
408
|
+
<a href="#min_adaptive_ttl-instance_method" title="#min_adaptive_ttl (instance method)">#<strong>min_adaptive_ttl</strong> ⇒ Integer </a>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
</span>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
<span class="note title readonly">readonly</span>
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
<span class="summary_desc"><div class='inline'>
|
428
|
+
<p>Minimum TTL in seconds (default: 30).</p>
|
429
|
+
</div></span>
|
430
|
+
|
431
|
+
</li>
|
432
|
+
|
433
|
+
|
434
|
+
<li class="public ">
|
435
|
+
<span class="summary_signature">
|
436
|
+
|
437
|
+
<a href="#performance_tracking_enabled-instance_method" title="#performance_tracking_enabled (instance method)">#<strong>performance_tracking_enabled</strong> ⇒ Boolean </a>
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
</span>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
<span class="note title readonly">readonly</span>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
<span class="summary_desc"><div class='inline'>
|
457
|
+
<p>Whether performance tracking is enabled (default: true).</p>
|
458
|
+
</div></span>
|
459
|
+
|
460
|
+
</li>
|
461
|
+
|
462
|
+
|
463
|
+
</ul>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<h2>
|
470
|
+
Instance Method Summary
|
471
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
472
|
+
</h2>
|
473
|
+
|
474
|
+
<ul class="summary">
|
475
|
+
|
476
|
+
<li class="public ">
|
477
|
+
<span class="summary_signature">
|
478
|
+
|
479
|
+
<a href="#cache_under_pressure%3F-instance_method" title="#cache_under_pressure? (instance method)">#<strong>cache_under_pressure?</strong>(utilization) ⇒ Boolean </a>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
</span>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
<span class="summary_desc"><div class='inline'>
|
494
|
+
<p>Check if cache is under pressure.</p>
|
495
|
+
</div></span>
|
496
|
+
|
497
|
+
</li>
|
498
|
+
|
499
|
+
|
500
|
+
<li class="public ">
|
501
|
+
<span class="summary_signature">
|
502
|
+
|
503
|
+
<a href="#calculate_adaptive_ttl-instance_method" title="#calculate_adaptive_ttl (instance method)">#<strong>calculate_adaptive_ttl</strong>(base_ttl, hit_rate: 0.0, generation_time: 0.0, access_frequency: 0) ⇒ Integer </a>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
</span>
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
<span class="summary_desc"><div class='inline'>
|
518
|
+
<p>Calculate adaptive TTL based on performance data.</p>
|
519
|
+
</div></span>
|
520
|
+
|
521
|
+
</li>
|
522
|
+
|
523
|
+
|
524
|
+
<li class="public ">
|
525
|
+
<span class="summary_signature">
|
526
|
+
|
527
|
+
<a href="#validate!-instance_method" title="#validate! (instance method)">#<strong>validate!</strong> ⇒ Object </a>
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
</span>
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
<span class="summary_desc"><div class='inline'>
|
542
|
+
<p>Validate entire configuration.</p>
|
543
|
+
</div></span>
|
544
|
+
|
545
|
+
</li>
|
546
|
+
|
547
|
+
|
548
|
+
<li class="public ">
|
549
|
+
<span class="summary_signature">
|
550
|
+
|
551
|
+
<a href="#validate_algorithm_parameters-instance_method" title="#validate_algorithm_parameters (instance method)">#<strong>validate_algorithm_parameters</strong> ⇒ Array<String> </a>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</span>
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
<span class="summary_desc"><div class='inline'>
|
566
|
+
<p>Validate algorithm parameters.</p>
|
567
|
+
</div></span>
|
568
|
+
|
569
|
+
</li>
|
570
|
+
|
571
|
+
|
572
|
+
<li class="public ">
|
573
|
+
<span class="summary_signature">
|
574
|
+
|
575
|
+
<a href="#validate_ttl_configuration-instance_method" title="#validate_ttl_configuration (instance method)">#<strong>validate_ttl_configuration</strong> ⇒ Array<String> </a>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
</span>
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
<span class="summary_desc"><div class='inline'>
|
590
|
+
<p>Validate TTL configuration.</p>
|
591
|
+
</div></span>
|
592
|
+
|
593
|
+
</li>
|
594
|
+
|
595
|
+
|
596
|
+
</ul>
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseConfig.html" title="Tasker::Types::BaseConfig (class)">BaseConfig</a></span></h3>
|
609
|
+
<p class="inherited"><span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">#initialize</a></span></p>
|
610
|
+
|
611
|
+
<div id="constructor_details" class="method_details_list">
|
612
|
+
<h2>Constructor Details</h2>
|
613
|
+
|
614
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseConfig.html#initialize-instance_method" title="Tasker::Types::BaseConfig#initialize (method)">Tasker::Types::BaseConfig</a></span></p>
|
615
|
+
|
616
|
+
</div>
|
617
|
+
|
618
|
+
<div id="instance_attr_details" class="attr_details">
|
619
|
+
<h2>Instance Attribute Details</h2>
|
620
|
+
|
621
|
+
|
622
|
+
<span id=""></span>
|
623
|
+
<div class="method_details first">
|
624
|
+
<h3 class="signature first" id="access_frequency_decay_rate-instance_method">
|
625
|
+
|
626
|
+
#<strong>access_frequency_decay_rate</strong> ⇒ <tt>Float</tt> <span class="extras">(readonly)</span>
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
</h3><div class="docstring">
|
633
|
+
<div class="discussion">
|
634
|
+
|
635
|
+
<p>Returns Decay rate (default: 0.95).</p>
|
636
|
+
|
637
|
+
|
638
|
+
</div>
|
639
|
+
</div>
|
640
|
+
<div class="tags">
|
641
|
+
|
642
|
+
<p class="tag_title">Returns:</p>
|
643
|
+
<ul class="return">
|
644
|
+
|
645
|
+
<li>
|
646
|
+
|
647
|
+
|
648
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
—
|
653
|
+
<div class='inline'>
|
654
|
+
<p>Decay rate (default: 0.95)</p>
|
655
|
+
</div>
|
656
|
+
|
657
|
+
</li>
|
658
|
+
|
659
|
+
</ul>
|
660
|
+
|
661
|
+
</div><table class="source_code">
|
662
|
+
<tr>
|
663
|
+
<td>
|
664
|
+
<pre class="lines">
|
665
|
+
|
666
|
+
|
667
|
+
99</pre>
|
668
|
+
</td>
|
669
|
+
<td>
|
670
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 99</span>
|
671
|
+
|
672
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:access_frequency_decay_rate</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Float</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='float'>0.95</span><span class='rparen'>)</span></pre>
|
673
|
+
</td>
|
674
|
+
</tr>
|
675
|
+
</table>
|
676
|
+
</div>
|
677
|
+
|
678
|
+
|
679
|
+
<span id=""></span>
|
680
|
+
<div class="method_details ">
|
681
|
+
<h3 class="signature " id="adaptive_calculation_interval-instance_method">
|
682
|
+
|
683
|
+
#<strong>adaptive_calculation_interval</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
</h3><div class="docstring">
|
690
|
+
<div class="discussion">
|
691
|
+
|
692
|
+
<p>Returns Calculation interval in seconds (default: 30).</p>
|
693
|
+
|
694
|
+
|
695
|
+
</div>
|
696
|
+
</div>
|
697
|
+
<div class="tags">
|
698
|
+
|
699
|
+
<p class="tag_title">Returns:</p>
|
700
|
+
<ul class="return">
|
701
|
+
|
702
|
+
<li>
|
703
|
+
|
704
|
+
|
705
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
—
|
710
|
+
<div class='inline'>
|
711
|
+
<p>Calculation interval in seconds (default: 30)</p>
|
712
|
+
</div>
|
713
|
+
|
714
|
+
</li>
|
715
|
+
|
716
|
+
</ul>
|
717
|
+
|
718
|
+
</div><table class="source_code">
|
719
|
+
<tr>
|
720
|
+
<td>
|
721
|
+
<pre class="lines">
|
722
|
+
|
723
|
+
|
724
|
+
144</pre>
|
725
|
+
</td>
|
726
|
+
<td>
|
727
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 144</span>
|
728
|
+
|
729
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:adaptive_calculation_interval</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Integer</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='int'>30</span><span class='rparen'>)</span></pre>
|
730
|
+
</td>
|
731
|
+
</tr>
|
732
|
+
</table>
|
733
|
+
</div>
|
734
|
+
|
735
|
+
|
736
|
+
<span id=""></span>
|
737
|
+
<div class="method_details ">
|
738
|
+
<h3 class="signature " id="adaptive_ttl_enabled-instance_method">
|
739
|
+
|
740
|
+
#<strong>adaptive_ttl_enabled</strong> ⇒ <tt>Boolean</tt> <span class="extras">(readonly)</span>
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
</h3><div class="docstring">
|
747
|
+
<div class="discussion">
|
748
|
+
|
749
|
+
<p>Returns Whether adaptive TTL is enabled (default: true).</p>
|
750
|
+
|
751
|
+
|
752
|
+
</div>
|
753
|
+
</div>
|
754
|
+
<div class="tags">
|
755
|
+
|
756
|
+
<p class="tag_title">Returns:</p>
|
757
|
+
<ul class="return">
|
758
|
+
|
759
|
+
<li>
|
760
|
+
|
761
|
+
|
762
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
—
|
767
|
+
<div class='inline'>
|
768
|
+
<p>Whether adaptive TTL is enabled (default: true)</p>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
</li>
|
772
|
+
|
773
|
+
</ul>
|
774
|
+
|
775
|
+
</div><table class="source_code">
|
776
|
+
<tr>
|
777
|
+
<td>
|
778
|
+
<pre class="lines">
|
779
|
+
|
780
|
+
|
781
|
+
70</pre>
|
782
|
+
</td>
|
783
|
+
<td>
|
784
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 70</span>
|
785
|
+
|
786
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:adaptive_ttl_enabled</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Bool</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span></pre>
|
787
|
+
</td>
|
788
|
+
</tr>
|
789
|
+
</table>
|
790
|
+
</div>
|
791
|
+
|
792
|
+
|
793
|
+
<span id=""></span>
|
794
|
+
<div class="method_details ">
|
795
|
+
<h3 class="signature " id="cache_pressure_threshold-instance_method">
|
796
|
+
|
797
|
+
#<strong>cache_pressure_threshold</strong> ⇒ <tt>Float</tt> <span class="extras">(readonly)</span>
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
</h3><div class="docstring">
|
804
|
+
<div class="discussion">
|
805
|
+
|
806
|
+
<p>Returns Pressure threshold (default: 0.8).</p>
|
807
|
+
|
808
|
+
|
809
|
+
</div>
|
810
|
+
</div>
|
811
|
+
<div class="tags">
|
812
|
+
|
813
|
+
<p class="tag_title">Returns:</p>
|
814
|
+
<ul class="return">
|
815
|
+
|
816
|
+
<li>
|
817
|
+
|
818
|
+
|
819
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
—
|
824
|
+
<div class='inline'>
|
825
|
+
<p>Pressure threshold (default: 0.8)</p>
|
826
|
+
</div>
|
827
|
+
|
828
|
+
</li>
|
829
|
+
|
830
|
+
</ul>
|
831
|
+
|
832
|
+
</div><table class="source_code">
|
833
|
+
<tr>
|
834
|
+
<td>
|
835
|
+
<pre class="lines">
|
836
|
+
|
837
|
+
|
838
|
+
135</pre>
|
839
|
+
</td>
|
840
|
+
<td>
|
841
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 135</span>
|
842
|
+
|
843
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:cache_pressure_threshold</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Float</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='float'>0.8</span><span class='rparen'>)</span></pre>
|
844
|
+
</td>
|
845
|
+
</tr>
|
846
|
+
</table>
|
847
|
+
</div>
|
848
|
+
|
849
|
+
|
850
|
+
<span id=""></span>
|
851
|
+
<div class="method_details ">
|
852
|
+
<h3 class="signature " id="dashboard_cache_ttl-instance_method">
|
853
|
+
|
854
|
+
#<strong>dashboard_cache_ttl</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
</h3><div class="docstring">
|
861
|
+
<div class="discussion">
|
862
|
+
|
863
|
+
<p>Returns Dashboard TTL in seconds (default: 120).</p>
|
864
|
+
|
865
|
+
|
866
|
+
</div>
|
867
|
+
</div>
|
868
|
+
<div class="tags">
|
869
|
+
|
870
|
+
<p class="tag_title">Returns:</p>
|
871
|
+
<ul class="return">
|
872
|
+
|
873
|
+
<li>
|
874
|
+
|
875
|
+
|
876
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
—
|
881
|
+
<div class='inline'>
|
882
|
+
<p>Dashboard TTL in seconds (default: 120)</p>
|
883
|
+
</div>
|
884
|
+
|
885
|
+
</li>
|
886
|
+
|
887
|
+
</ul>
|
888
|
+
|
889
|
+
</div><table class="source_code">
|
890
|
+
<tr>
|
891
|
+
<td>
|
892
|
+
<pre class="lines">
|
893
|
+
|
894
|
+
|
895
|
+
126</pre>
|
896
|
+
</td>
|
897
|
+
<td>
|
898
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 126</span>
|
899
|
+
|
900
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:dashboard_cache_ttl</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Integer</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='int'>120</span><span class='rparen'>)</span></pre>
|
901
|
+
</td>
|
902
|
+
</tr>
|
903
|
+
</table>
|
904
|
+
</div>
|
905
|
+
|
906
|
+
|
907
|
+
<span id=""></span>
|
908
|
+
<div class="method_details ">
|
909
|
+
<h3 class="signature " id="default_ttl-instance_method">
|
910
|
+
|
911
|
+
#<strong>default_ttl</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
</h3><div class="docstring">
|
918
|
+
<div class="discussion">
|
919
|
+
|
920
|
+
<p>Returns Default TTL in seconds (default: 300).</p>
|
921
|
+
|
922
|
+
|
923
|
+
</div>
|
924
|
+
</div>
|
925
|
+
<div class="tags">
|
926
|
+
|
927
|
+
<p class="tag_title">Returns:</p>
|
928
|
+
<ul class="return">
|
929
|
+
|
930
|
+
<li>
|
931
|
+
|
932
|
+
|
933
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
—
|
938
|
+
<div class='inline'>
|
939
|
+
<p>Default TTL in seconds (default: 300)</p>
|
940
|
+
</div>
|
941
|
+
|
942
|
+
</li>
|
943
|
+
|
944
|
+
</ul>
|
945
|
+
|
946
|
+
</div><table class="source_code">
|
947
|
+
<tr>
|
948
|
+
<td>
|
949
|
+
<pre class="lines">
|
950
|
+
|
951
|
+
|
952
|
+
61</pre>
|
953
|
+
</td>
|
954
|
+
<td>
|
955
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 61</span>
|
956
|
+
|
957
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:default_ttl</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Integer</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='int'>300</span><span class='rparen'>)</span></pre>
|
958
|
+
</td>
|
959
|
+
</tr>
|
960
|
+
</table>
|
961
|
+
</div>
|
962
|
+
|
963
|
+
|
964
|
+
<span id=""></span>
|
965
|
+
<div class="method_details ">
|
966
|
+
<h3 class="signature " id="hit_rate_smoothing_factor-instance_method">
|
967
|
+
|
968
|
+
#<strong>hit_rate_smoothing_factor</strong> ⇒ <tt>Float</tt> <span class="extras">(readonly)</span>
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</h3><div class="docstring">
|
975
|
+
<div class="discussion">
|
976
|
+
|
977
|
+
<p>Returns Smoothing factor (default: 0.9).</p>
|
978
|
+
|
979
|
+
|
980
|
+
</div>
|
981
|
+
</div>
|
982
|
+
<div class="tags">
|
983
|
+
|
984
|
+
<p class="tag_title">Returns:</p>
|
985
|
+
<ul class="return">
|
986
|
+
|
987
|
+
<li>
|
988
|
+
|
989
|
+
|
990
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
—
|
995
|
+
<div class='inline'>
|
996
|
+
<p>Smoothing factor (default: 0.9)</p>
|
997
|
+
</div>
|
998
|
+
|
999
|
+
</li>
|
1000
|
+
|
1001
|
+
</ul>
|
1002
|
+
|
1003
|
+
</div><table class="source_code">
|
1004
|
+
<tr>
|
1005
|
+
<td>
|
1006
|
+
<pre class="lines">
|
1007
|
+
|
1008
|
+
|
1009
|
+
89</pre>
|
1010
|
+
</td>
|
1011
|
+
<td>
|
1012
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 89</span>
|
1013
|
+
|
1014
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:hit_rate_smoothing_factor</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Float</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='float'>0.9</span><span class='rparen'>)</span></pre>
|
1015
|
+
</td>
|
1016
|
+
</tr>
|
1017
|
+
</table>
|
1018
|
+
</div>
|
1019
|
+
|
1020
|
+
|
1021
|
+
<span id=""></span>
|
1022
|
+
<div class="method_details ">
|
1023
|
+
<h3 class="signature " id="max_adaptive_ttl-instance_method">
|
1024
|
+
|
1025
|
+
#<strong>max_adaptive_ttl</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
|
1031
|
+
</h3><div class="docstring">
|
1032
|
+
<div class="discussion">
|
1033
|
+
|
1034
|
+
<p>Returns Maximum TTL in seconds (default: 3600).</p>
|
1035
|
+
|
1036
|
+
|
1037
|
+
</div>
|
1038
|
+
</div>
|
1039
|
+
<div class="tags">
|
1040
|
+
|
1041
|
+
<p class="tag_title">Returns:</p>
|
1042
|
+
<ul class="return">
|
1043
|
+
|
1044
|
+
<li>
|
1045
|
+
|
1046
|
+
|
1047
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
—
|
1052
|
+
<div class='inline'>
|
1053
|
+
<p>Maximum TTL in seconds (default: 3600)</p>
|
1054
|
+
</div>
|
1055
|
+
|
1056
|
+
</li>
|
1057
|
+
|
1058
|
+
</ul>
|
1059
|
+
|
1060
|
+
</div><table class="source_code">
|
1061
|
+
<tr>
|
1062
|
+
<td>
|
1063
|
+
<pre class="lines">
|
1064
|
+
|
1065
|
+
|
1066
|
+
117</pre>
|
1067
|
+
</td>
|
1068
|
+
<td>
|
1069
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 117</span>
|
1070
|
+
|
1071
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:max_adaptive_ttl</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Integer</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='int'>3600</span><span class='rparen'>)</span></pre>
|
1072
|
+
</td>
|
1073
|
+
</tr>
|
1074
|
+
</table>
|
1075
|
+
</div>
|
1076
|
+
|
1077
|
+
|
1078
|
+
<span id=""></span>
|
1079
|
+
<div class="method_details ">
|
1080
|
+
<h3 class="signature " id="min_adaptive_ttl-instance_method">
|
1081
|
+
|
1082
|
+
#<strong>min_adaptive_ttl</strong> ⇒ <tt>Integer</tt> <span class="extras">(readonly)</span>
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
</h3><div class="docstring">
|
1089
|
+
<div class="discussion">
|
1090
|
+
|
1091
|
+
<p>Returns Minimum TTL in seconds (default: 30).</p>
|
1092
|
+
|
1093
|
+
|
1094
|
+
</div>
|
1095
|
+
</div>
|
1096
|
+
<div class="tags">
|
1097
|
+
|
1098
|
+
<p class="tag_title">Returns:</p>
|
1099
|
+
<ul class="return">
|
1100
|
+
|
1101
|
+
<li>
|
1102
|
+
|
1103
|
+
|
1104
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
—
|
1109
|
+
<div class='inline'>
|
1110
|
+
<p>Minimum TTL in seconds (default: 30)</p>
|
1111
|
+
</div>
|
1112
|
+
|
1113
|
+
</li>
|
1114
|
+
|
1115
|
+
</ul>
|
1116
|
+
|
1117
|
+
</div><table class="source_code">
|
1118
|
+
<tr>
|
1119
|
+
<td>
|
1120
|
+
<pre class="lines">
|
1121
|
+
|
1122
|
+
|
1123
|
+
108</pre>
|
1124
|
+
</td>
|
1125
|
+
<td>
|
1126
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 108</span>
|
1127
|
+
|
1128
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:min_adaptive_ttl</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Integer</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='int'>30</span><span class='rparen'>)</span></pre>
|
1129
|
+
</td>
|
1130
|
+
</tr>
|
1131
|
+
</table>
|
1132
|
+
</div>
|
1133
|
+
|
1134
|
+
|
1135
|
+
<span id=""></span>
|
1136
|
+
<div class="method_details ">
|
1137
|
+
<h3 class="signature " id="performance_tracking_enabled-instance_method">
|
1138
|
+
|
1139
|
+
#<strong>performance_tracking_enabled</strong> ⇒ <tt>Boolean</tt> <span class="extras">(readonly)</span>
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
</h3><div class="docstring">
|
1146
|
+
<div class="discussion">
|
1147
|
+
|
1148
|
+
<p>Returns Whether performance tracking is enabled (default: true).</p>
|
1149
|
+
|
1150
|
+
|
1151
|
+
</div>
|
1152
|
+
</div>
|
1153
|
+
<div class="tags">
|
1154
|
+
|
1155
|
+
<p class="tag_title">Returns:</p>
|
1156
|
+
<ul class="return">
|
1157
|
+
|
1158
|
+
<li>
|
1159
|
+
|
1160
|
+
|
1161
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
1165
|
+
—
|
1166
|
+
<div class='inline'>
|
1167
|
+
<p>Whether performance tracking is enabled (default: true)</p>
|
1168
|
+
</div>
|
1169
|
+
|
1170
|
+
</li>
|
1171
|
+
|
1172
|
+
</ul>
|
1173
|
+
|
1174
|
+
</div><table class="source_code">
|
1175
|
+
<tr>
|
1176
|
+
<td>
|
1177
|
+
<pre class="lines">
|
1178
|
+
|
1179
|
+
|
1180
|
+
79</pre>
|
1181
|
+
</td>
|
1182
|
+
<td>
|
1183
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 79</span>
|
1184
|
+
|
1185
|
+
<span class='id identifier rubyid_attribute'>attribute</span> <span class='symbol'>:performance_tracking_enabled</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../Types.html" title="Tasker::Types (module)">Types</a></span></span><span class='op'>::</span><span class='const'>Bool</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span></pre>
|
1186
|
+
</td>
|
1187
|
+
</tr>
|
1188
|
+
</table>
|
1189
|
+
</div>
|
1190
|
+
|
1191
|
+
</div>
|
1192
|
+
|
1193
|
+
|
1194
|
+
<div id="instance_method_details" class="method_details_list">
|
1195
|
+
<h2>Instance Method Details</h2>
|
1196
|
+
|
1197
|
+
|
1198
|
+
<div class="method_details first">
|
1199
|
+
<h3 class="signature first" id="cache_under_pressure?-instance_method">
|
1200
|
+
|
1201
|
+
#<strong>cache_under_pressure?</strong>(utilization) ⇒ <tt>Boolean</tt>
|
1202
|
+
|
1203
|
+
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
</h3><div class="docstring">
|
1208
|
+
<div class="discussion">
|
1209
|
+
|
1210
|
+
<p>Check if cache is under pressure</p>
|
1211
|
+
|
1212
|
+
|
1213
|
+
</div>
|
1214
|
+
</div>
|
1215
|
+
<div class="tags">
|
1216
|
+
<p class="tag_title">Parameters:</p>
|
1217
|
+
<ul class="param">
|
1218
|
+
|
1219
|
+
<li>
|
1220
|
+
|
1221
|
+
<span class='name'>utilization</span>
|
1222
|
+
|
1223
|
+
|
1224
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
—
|
1229
|
+
<div class='inline'>
|
1230
|
+
<p>Current cache utilization (0.0-1.0)</p>
|
1231
|
+
</div>
|
1232
|
+
|
1233
|
+
</li>
|
1234
|
+
|
1235
|
+
</ul>
|
1236
|
+
|
1237
|
+
<p class="tag_title">Returns:</p>
|
1238
|
+
<ul class="return">
|
1239
|
+
|
1240
|
+
<li>
|
1241
|
+
|
1242
|
+
|
1243
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1244
|
+
|
1245
|
+
|
1246
|
+
|
1247
|
+
—
|
1248
|
+
<div class='inline'>
|
1249
|
+
<p>Whether cache is under pressure</p>
|
1250
|
+
</div>
|
1251
|
+
|
1252
|
+
</li>
|
1253
|
+
|
1254
|
+
</ul>
|
1255
|
+
|
1256
|
+
</div><table class="source_code">
|
1257
|
+
<tr>
|
1258
|
+
<td>
|
1259
|
+
<pre class="lines">
|
1260
|
+
|
1261
|
+
|
1262
|
+
252
|
1263
|
+
253
|
1264
|
+
254</pre>
|
1265
|
+
</td>
|
1266
|
+
<td>
|
1267
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 252</span>
|
1268
|
+
|
1269
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cache_under_pressure?'>cache_under_pressure?</span><span class='lparen'>(</span><span class='id identifier rubyid_utilization'>utilization</span><span class='rparen'>)</span>
|
1270
|
+
<span class='id identifier rubyid_utilization'>utilization</span> <span class='op'>>=</span> <span class='id identifier rubyid_cache_pressure_threshold'>cache_pressure_threshold</span>
|
1271
|
+
<span class='kw'>end</span></pre>
|
1272
|
+
</td>
|
1273
|
+
</tr>
|
1274
|
+
</table>
|
1275
|
+
</div>
|
1276
|
+
|
1277
|
+
<div class="method_details ">
|
1278
|
+
<h3 class="signature " id="calculate_adaptive_ttl-instance_method">
|
1279
|
+
|
1280
|
+
#<strong>calculate_adaptive_ttl</strong>(base_ttl, hit_rate: 0.0, generation_time: 0.0, access_frequency: 0) ⇒ <tt>Integer</tt>
|
1281
|
+
|
1282
|
+
|
1283
|
+
|
1284
|
+
|
1285
|
+
|
1286
|
+
</h3><div class="docstring">
|
1287
|
+
<div class="discussion">
|
1288
|
+
|
1289
|
+
<p>Calculate adaptive TTL based on performance data</p>
|
1290
|
+
|
1291
|
+
|
1292
|
+
</div>
|
1293
|
+
</div>
|
1294
|
+
<div class="tags">
|
1295
|
+
<p class="tag_title">Parameters:</p>
|
1296
|
+
<ul class="param">
|
1297
|
+
|
1298
|
+
<li>
|
1299
|
+
|
1300
|
+
<span class='name'>base_ttl</span>
|
1301
|
+
|
1302
|
+
|
1303
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1304
|
+
|
1305
|
+
|
1306
|
+
|
1307
|
+
—
|
1308
|
+
<div class='inline'>
|
1309
|
+
<p>Base TTL to adjust</p>
|
1310
|
+
</div>
|
1311
|
+
|
1312
|
+
</li>
|
1313
|
+
|
1314
|
+
<li>
|
1315
|
+
|
1316
|
+
<span class='name'>hit_rate</span>
|
1317
|
+
|
1318
|
+
|
1319
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
1320
|
+
|
1321
|
+
|
1322
|
+
<em class="default">(defaults to: <tt>0.0</tt>)</em>
|
1323
|
+
|
1324
|
+
|
1325
|
+
—
|
1326
|
+
<div class='inline'>
|
1327
|
+
<p>Current cache hit rate (0.0-1.0)</p>
|
1328
|
+
</div>
|
1329
|
+
|
1330
|
+
</li>
|
1331
|
+
|
1332
|
+
<li>
|
1333
|
+
|
1334
|
+
<span class='name'>generation_time</span>
|
1335
|
+
|
1336
|
+
|
1337
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
1338
|
+
|
1339
|
+
|
1340
|
+
<em class="default">(defaults to: <tt>0.0</tt>)</em>
|
1341
|
+
|
1342
|
+
|
1343
|
+
—
|
1344
|
+
<div class='inline'>
|
1345
|
+
<p>Average generation time in seconds</p>
|
1346
|
+
</div>
|
1347
|
+
|
1348
|
+
</li>
|
1349
|
+
|
1350
|
+
<li>
|
1351
|
+
|
1352
|
+
<span class='name'>access_frequency</span>
|
1353
|
+
|
1354
|
+
|
1355
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1356
|
+
|
1357
|
+
|
1358
|
+
<em class="default">(defaults to: <tt>0</tt>)</em>
|
1359
|
+
|
1360
|
+
|
1361
|
+
—
|
1362
|
+
<div class='inline'>
|
1363
|
+
<p>Access frequency count</p>
|
1364
|
+
</div>
|
1365
|
+
|
1366
|
+
</li>
|
1367
|
+
|
1368
|
+
</ul>
|
1369
|
+
|
1370
|
+
<p class="tag_title">Returns:</p>
|
1371
|
+
<ul class="return">
|
1372
|
+
|
1373
|
+
<li>
|
1374
|
+
|
1375
|
+
|
1376
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1377
|
+
|
1378
|
+
|
1379
|
+
|
1380
|
+
—
|
1381
|
+
<div class='inline'>
|
1382
|
+
<p>Calculated adaptive TTL</p>
|
1383
|
+
</div>
|
1384
|
+
|
1385
|
+
</li>
|
1386
|
+
|
1387
|
+
</ul>
|
1388
|
+
|
1389
|
+
</div><table class="source_code">
|
1390
|
+
<tr>
|
1391
|
+
<td>
|
1392
|
+
<pre class="lines">
|
1393
|
+
|
1394
|
+
|
1395
|
+
217
|
1396
|
+
218
|
1397
|
+
219
|
1398
|
+
220
|
1399
|
+
221
|
1400
|
+
222
|
1401
|
+
223
|
1402
|
+
224
|
1403
|
+
225
|
1404
|
+
226
|
1405
|
+
227
|
1406
|
+
228
|
1407
|
+
229
|
1408
|
+
230
|
1409
|
+
231
|
1410
|
+
232
|
1411
|
+
233
|
1412
|
+
234
|
1413
|
+
235
|
1414
|
+
236
|
1415
|
+
237
|
1416
|
+
238
|
1417
|
+
239
|
1418
|
+
240
|
1419
|
+
241
|
1420
|
+
242
|
1421
|
+
243
|
1422
|
+
244
|
1423
|
+
245
|
1424
|
+
246</pre>
|
1425
|
+
</td>
|
1426
|
+
<td>
|
1427
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 217</span>
|
1428
|
+
|
1429
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_calculate_adaptive_ttl'>calculate_adaptive_ttl</span><span class='lparen'>(</span><span class='id identifier rubyid_base_ttl'>base_ttl</span><span class='comma'>,</span> <span class='label'>hit_rate:</span> <span class='float'>0.0</span><span class='comma'>,</span> <span class='label'>generation_time:</span> <span class='float'>0.0</span><span class='comma'>,</span> <span class='label'>access_frequency:</span> <span class='int'>0</span><span class='rparen'>)</span>
|
1430
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_base_ttl'>base_ttl</span> <span class='kw'>unless</span> <span class='id identifier rubyid_adaptive_ttl_enabled'>adaptive_ttl_enabled</span>
|
1431
|
+
|
1432
|
+
<span class='comment'># Start with base TTL as float for more precise calculations
|
1433
|
+
</span> <span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>=</span> <span class='id identifier rubyid_base_ttl'>base_ttl</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
|
1434
|
+
|
1435
|
+
<span class='comment'># Adjust based on hit rate (only if we have meaningful data)
|
1436
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_hit_rate'>hit_rate</span> <span class='op'>></span> <span class='float'>0.8</span>
|
1437
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>1.5</span> <span class='comment'># High hit rate, extend TTL
|
1438
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_hit_rate'>hit_rate</span> <span class='op'>></span> <span class='float'>0.0</span> <span class='op'>&&</span> <span class='id identifier rubyid_hit_rate'>hit_rate</span> <span class='op'><</span> <span class='float'>0.3</span>
|
1439
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>0.7</span> <span class='comment'># Low hit rate, reduce TTL
|
1440
|
+
</span> <span class='kw'>end</span>
|
1441
|
+
|
1442
|
+
<span class='comment'># Adjust based on generation time (only if we have meaningful data)
|
1443
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_generation_time'>generation_time</span> <span class='op'>></span> <span class='float'>1.0</span>
|
1444
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>1.3</span> <span class='comment'># Expensive to generate, cache longer
|
1445
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_generation_time'>generation_time</span> <span class='op'>></span> <span class='float'>0.0</span> <span class='op'>&&</span> <span class='id identifier rubyid_generation_time'>generation_time</span> <span class='op'><</span> <span class='float'>0.1</span>
|
1446
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>0.8</span> <span class='comment'># Cheap to generate, cache shorter
|
1447
|
+
</span> <span class='kw'>end</span>
|
1448
|
+
|
1449
|
+
<span class='comment'># Adjust based on access frequency (only if we have meaningful data)
|
1450
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_access_frequency'>access_frequency</span> <span class='op'>></span> <span class='int'>100</span>
|
1451
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>1.2</span> <span class='comment'># Frequently accessed, cache longer
|
1452
|
+
</span> <span class='kw'>elsif</span> <span class='id identifier rubyid_access_frequency'>access_frequency</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span> <span class='op'>&&</span> <span class='id identifier rubyid_access_frequency'>access_frequency</span> <span class='op'><</span> <span class='int'>5</span>
|
1453
|
+
<span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span> <span class='op'>*=</span> <span class='float'>0.9</span> <span class='comment'># Rarely accessed, cache shorter
|
1454
|
+
</span> <span class='kw'>end</span>
|
1455
|
+
|
1456
|
+
<span class='comment'># Convert to integer and apply bounds
|
1457
|
+
</span> <span class='id identifier rubyid_adaptive_ttl'>adaptive_ttl</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='period'>.</span><span class='id identifier rubyid_clamp'>clamp</span><span class='lparen'>(</span><span class='id identifier rubyid_min_adaptive_ttl'>min_adaptive_ttl</span><span class='comma'>,</span> <span class='id identifier rubyid_max_adaptive_ttl'>max_adaptive_ttl</span><span class='rparen'>)</span>
|
1458
|
+
<span class='kw'>end</span></pre>
|
1459
|
+
</td>
|
1460
|
+
</tr>
|
1461
|
+
</table>
|
1462
|
+
</div>
|
1463
|
+
|
1464
|
+
<div class="method_details ">
|
1465
|
+
<h3 class="signature " id="validate!-instance_method">
|
1466
|
+
|
1467
|
+
#<strong>validate!</strong> ⇒ <tt>Object</tt>
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
</h3><div class="docstring">
|
1474
|
+
<div class="discussion">
|
1475
|
+
|
1476
|
+
<p>Validate entire configuration</p>
|
1477
|
+
|
1478
|
+
<p>Runs all validation checks and raises if any errors found</p>
|
1479
|
+
|
1480
|
+
|
1481
|
+
</div>
|
1482
|
+
</div>
|
1483
|
+
<div class="tags">
|
1484
|
+
|
1485
|
+
<p class="tag_title">Raises:</p>
|
1486
|
+
<ul class="raise">
|
1487
|
+
|
1488
|
+
<li>
|
1489
|
+
|
1490
|
+
|
1491
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
—
|
1496
|
+
<div class='inline'>
|
1497
|
+
<p>If configuration is invalid</p>
|
1498
|
+
</div>
|
1499
|
+
|
1500
|
+
</li>
|
1501
|
+
|
1502
|
+
</ul>
|
1503
|
+
|
1504
|
+
</div><table class="source_code">
|
1505
|
+
<tr>
|
1506
|
+
<td>
|
1507
|
+
<pre class="lines">
|
1508
|
+
|
1509
|
+
|
1510
|
+
202
|
1511
|
+
203
|
1512
|
+
204
|
1513
|
+
205
|
1514
|
+
206
|
1515
|
+
207
|
1516
|
+
208</pre>
|
1517
|
+
</td>
|
1518
|
+
<td>
|
1519
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 202</span>
|
1520
|
+
|
1521
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate!'>validate!</span>
|
1522
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'>=</span> <span class='id identifier rubyid_validate_ttl_configuration'>validate_ttl_configuration</span> <span class='op'>+</span> <span class='id identifier rubyid_validate_algorithm_parameters'>validate_algorithm_parameters</span>
|
1523
|
+
|
1524
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1525
|
+
|
1526
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid cache configuration: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>, </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1527
|
+
<span class='kw'>end</span></pre>
|
1528
|
+
</td>
|
1529
|
+
</tr>
|
1530
|
+
</table>
|
1531
|
+
</div>
|
1532
|
+
|
1533
|
+
<div class="method_details ">
|
1534
|
+
<h3 class="signature " id="validate_algorithm_parameters-instance_method">
|
1535
|
+
|
1536
|
+
#<strong>validate_algorithm_parameters</strong> ⇒ <tt>Array<String></tt>
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
|
1542
|
+
</h3><div class="docstring">
|
1543
|
+
<div class="discussion">
|
1544
|
+
|
1545
|
+
<p>Validate algorithm parameters</p>
|
1546
|
+
|
1547
|
+
<p>Ensures smoothing factors and thresholds are within valid ranges</p>
|
1548
|
+
|
1549
|
+
|
1550
|
+
</div>
|
1551
|
+
</div>
|
1552
|
+
<div class="tags">
|
1553
|
+
|
1554
|
+
<p class="tag_title">Returns:</p>
|
1555
|
+
<ul class="return">
|
1556
|
+
|
1557
|
+
<li>
|
1558
|
+
|
1559
|
+
|
1560
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1561
|
+
|
1562
|
+
|
1563
|
+
|
1564
|
+
—
|
1565
|
+
<div class='inline'>
|
1566
|
+
<p>Validation errors (empty if valid)</p>
|
1567
|
+
</div>
|
1568
|
+
|
1569
|
+
</li>
|
1570
|
+
|
1571
|
+
</ul>
|
1572
|
+
|
1573
|
+
</div><table class="source_code">
|
1574
|
+
<tr>
|
1575
|
+
<td>
|
1576
|
+
<pre class="lines">
|
1577
|
+
|
1578
|
+
|
1579
|
+
176
|
1580
|
+
177
|
1581
|
+
178
|
1582
|
+
179
|
1583
|
+
180
|
1584
|
+
181
|
1585
|
+
182
|
1586
|
+
183
|
1587
|
+
184
|
1588
|
+
185
|
1589
|
+
186
|
1590
|
+
187
|
1591
|
+
188
|
1592
|
+
189
|
1593
|
+
190
|
1594
|
+
191
|
1595
|
+
192
|
1596
|
+
193
|
1597
|
+
194
|
1598
|
+
195
|
1599
|
+
196</pre>
|
1600
|
+
</td>
|
1601
|
+
<td>
|
1602
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 176</span>
|
1603
|
+
|
1604
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_algorithm_parameters'>validate_algorithm_parameters</span>
|
1605
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1606
|
+
|
1607
|
+
<span class='kw'>unless</span> <span class='lparen'>(</span><span class='float'>0.0</span><span class='op'>..</span><span class='float'>1.0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_cover?'>cover?</span><span class='lparen'>(</span><span class='id identifier rubyid_hit_rate_smoothing_factor'>hit_rate_smoothing_factor</span><span class='rparen'>)</span>
|
1608
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hit_rate_smoothing_factor must be between 0.0 and 1.0 (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hit_rate_smoothing_factor'>hit_rate_smoothing_factor</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
1609
|
+
<span class='kw'>end</span>
|
1610
|
+
|
1611
|
+
<span class='kw'>unless</span> <span class='lparen'>(</span><span class='float'>0.0</span><span class='op'>..</span><span class='float'>1.0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_cover?'>cover?</span><span class='lparen'>(</span><span class='id identifier rubyid_access_frequency_decay_rate'>access_frequency_decay_rate</span><span class='rparen'>)</span>
|
1612
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>access_frequency_decay_rate must be between 0.0 and 1.0 (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_access_frequency_decay_rate'>access_frequency_decay_rate</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
1613
|
+
<span class='kw'>end</span>
|
1614
|
+
|
1615
|
+
<span class='kw'>unless</span> <span class='lparen'>(</span><span class='float'>0.0</span><span class='op'>..</span><span class='float'>1.0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_cover?'>cover?</span><span class='lparen'>(</span><span class='id identifier rubyid_cache_pressure_threshold'>cache_pressure_threshold</span><span class='rparen'>)</span>
|
1616
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cache_pressure_threshold must be between 0.0 and 1.0 (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cache_pressure_threshold'>cache_pressure_threshold</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
1617
|
+
<span class='kw'>end</span>
|
1618
|
+
|
1619
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_adaptive_calculation_interval'>adaptive_calculation_interval</span> <span class='op'><=</span> <span class='int'>0</span>
|
1620
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>adaptive_calculation_interval must be positive (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_adaptive_calculation_interval'>adaptive_calculation_interval</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
1621
|
+
<span class='kw'>end</span>
|
1622
|
+
|
1623
|
+
<span class='id identifier rubyid_errors'>errors</span>
|
1624
|
+
<span class='kw'>end</span></pre>
|
1625
|
+
</td>
|
1626
|
+
</tr>
|
1627
|
+
</table>
|
1628
|
+
</div>
|
1629
|
+
|
1630
|
+
<div class="method_details ">
|
1631
|
+
<h3 class="signature " id="validate_ttl_configuration-instance_method">
|
1632
|
+
|
1633
|
+
#<strong>validate_ttl_configuration</strong> ⇒ <tt>Array<String></tt>
|
1634
|
+
|
1635
|
+
|
1636
|
+
|
1637
|
+
|
1638
|
+
|
1639
|
+
</h3><div class="docstring">
|
1640
|
+
<div class="discussion">
|
1641
|
+
|
1642
|
+
<p>Validate TTL configuration</p>
|
1643
|
+
|
1644
|
+
<p>Ensures TTL values are positive and logical</p>
|
1645
|
+
|
1646
|
+
|
1647
|
+
</div>
|
1648
|
+
</div>
|
1649
|
+
<div class="tags">
|
1650
|
+
|
1651
|
+
<p class="tag_title">Returns:</p>
|
1652
|
+
<ul class="return">
|
1653
|
+
|
1654
|
+
<li>
|
1655
|
+
|
1656
|
+
|
1657
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1658
|
+
|
1659
|
+
|
1660
|
+
|
1661
|
+
—
|
1662
|
+
<div class='inline'>
|
1663
|
+
<p>Validation errors (empty if valid)</p>
|
1664
|
+
</div>
|
1665
|
+
|
1666
|
+
</li>
|
1667
|
+
|
1668
|
+
</ul>
|
1669
|
+
|
1670
|
+
</div><table class="source_code">
|
1671
|
+
<tr>
|
1672
|
+
<td>
|
1673
|
+
<pre class="lines">
|
1674
|
+
|
1675
|
+
|
1676
|
+
154
|
1677
|
+
155
|
1678
|
+
156
|
1679
|
+
157
|
1680
|
+
158
|
1681
|
+
159
|
1682
|
+
160
|
1683
|
+
161
|
1684
|
+
162
|
1685
|
+
163
|
1686
|
+
164
|
1687
|
+
165
|
1688
|
+
166
|
1689
|
+
167
|
1690
|
+
168
|
1691
|
+
169
|
1692
|
+
170</pre>
|
1693
|
+
</td>
|
1694
|
+
<td>
|
1695
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/types/cache_config.rb', line 154</span>
|
1696
|
+
|
1697
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_ttl_configuration'>validate_ttl_configuration</span>
|
1698
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1699
|
+
|
1700
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>default_ttl must be positive (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_default_ttl'>default_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_default_ttl'>default_ttl</span> <span class='op'><=</span> <span class='int'>0</span>
|
1701
|
+
|
1702
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>min_adaptive_ttl must be positive (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_min_adaptive_ttl'>min_adaptive_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_min_adaptive_ttl'>min_adaptive_ttl</span> <span class='op'><=</span> <span class='int'>0</span>
|
1703
|
+
|
1704
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>max_adaptive_ttl must be positive (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_max_adaptive_ttl'>max_adaptive_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_max_adaptive_ttl'>max_adaptive_ttl</span> <span class='op'><=</span> <span class='int'>0</span>
|
1705
|
+
|
1706
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_min_adaptive_ttl'>min_adaptive_ttl</span> <span class='op'>>=</span> <span class='id identifier rubyid_max_adaptive_ttl'>max_adaptive_ttl</span>
|
1707
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>min_adaptive_ttl (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_min_adaptive_ttl'>min_adaptive_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>) must be less than max_adaptive_ttl (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_max_adaptive_ttl'>max_adaptive_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span>
|
1708
|
+
<span class='kw'>end</span>
|
1709
|
+
|
1710
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dashboard_cache_ttl must be positive (got: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dashboard_cache_ttl'>dashboard_cache_ttl</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_dashboard_cache_ttl'>dashboard_cache_ttl</span> <span class='op'><=</span> <span class='int'>0</span>
|
1711
|
+
|
1712
|
+
<span class='id identifier rubyid_errors'>errors</span>
|
1713
|
+
<span class='kw'>end</span></pre>
|
1714
|
+
</td>
|
1715
|
+
</tr>
|
1716
|
+
</table>
|
1717
|
+
</div>
|
1718
|
+
|
1719
|
+
</div>
|
1720
|
+
|
1721
|
+
</div>
|
1722
|
+
|
1723
|
+
<div id="footer">
|
1724
|
+
Generated on Tue Jul 1 16:47:36 2025 by
|
1725
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1726
|
+
0.9.37 (ruby-3.2.4).
|
1727
|
+
</div>
|
1728
|
+
|
1729
|
+
</div>
|
1730
|
+
</body>
|
1731
|
+
</html>
|