Class: Scryer::CacheCallInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/scryer/cache_extractor.rb

Overview

A Rails.cache.fetch(key) { value } or Rails.cache.write(key, value) call site: what gets cached (token_stream, for comparing against other call sites) and under what key (cache_key, kept as display text rather than normalized — two sites caching the same value are only worth flagging when their keys actually differ; see Scanner).

Instance Attribute Summary collapse

Instance Attribute Details

#cache_keyObject

Returns the value of attribute cache_key

Returns:

  • (Object)

    the current value of cache_key



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def cache_key
  @cache_key
end

#end_lineObject

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def end_line
  @end_line
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def file
  @file
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def name
  @name
end

#source_snippetObject

Returns the value of attribute source_snippet

Returns:

  • (Object)

    the current value of source_snippet



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def source_snippet
  @source_snippet
end

#start_lineObject

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def start_line
  @start_line
end

#token_streamObject

Returns the value of attribute token_stream

Returns:

  • (Object)

    the current value of token_stream



9
10
11
# File 'lib/scryer/cache_extractor.rb', line 9

def token_stream
  @token_stream
end