mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-13 06:38:52 +02:00
![twitter-team](/assets/img/avatar_default.png)
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
17 lines
753 B
Scala
17 lines
753 B
Scala
package com.twitter.product_mixer.component_library.premarshaller.urt.builder
|
|
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.ClearCacheTimelineInstruction
|
|
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
|
import com.twitter.product_mixer.core.pipeline.PipelineQuery
|
|
|
|
case class ClearCacheInstructionBuilder[Query <: PipelineQuery](
|
|
override val includeInstruction: IncludeInstruction[Query] = AlwaysInclude)
|
|
extends UrtInstructionBuilder[Query, ClearCacheTimelineInstruction] {
|
|
|
|
override def build(
|
|
query: Query,
|
|
entries: Seq[TimelineEntry]
|
|
): Seq[ClearCacheTimelineInstruction] =
|
|
if (includeInstruction(query, entries)) Seq(ClearCacheTimelineInstruction()) else Seq.empty
|
|
}
|