Skip to content

Commit

Permalink
Disable caching of view queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed Jun 19, 2024
1 parent c243806 commit 1a6a2f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-19T12:37:39","documenter_version":"1.4.1"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-19T12:48:58","documenter_version":"1.4.1"}}
8 changes: 4 additions & 4 deletions src/views.jl
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ function Formats.format_get_scalar(view::DafView, name::AbstractString)::Storage
fetch_scalar = view.scalars[name]
scalar_value = fetch_scalar.value
if scalar_value === nothing
scalar_value = get_query(view.daf, fetch_scalar.query)
scalar_value = get_query(view.daf, fetch_scalar.query; cache = false)
fetch_scalar.value = scalar_value
end
return scalar_value
Expand All @@ -662,7 +662,7 @@ function Formats.format_axis_array(view::DafView, axis::AbstractString)::Abstrac
fetch_axis = view.axes[axis]
axis_array = fetch_axis.value
if axis_array === nothing
axis_array = Formats.read_only_array(get_query(view.daf, fetch_axis.query))
axis_array = Formats.read_only_array(get_query(view.daf, fetch_axis.query; cache = false))
fetch_axis.value = axis_array
end
return axis_array
Expand All @@ -688,7 +688,7 @@ function Formats.format_get_vector(view::DafView, axis::AbstractString, name::Ab
fetch_vector = view.vectors[axis][name]
vector_value = fetch_vector.value
if vector_value === nothing
vector_value = Formats.read_only_array(get_query(view.daf, fetch_vector.query))
vector_value = Formats.read_only_array(get_query(view.daf, fetch_vector.query; cache = false))
@assert vector_value isa NamedArray && names(vector_value, 1) == Formats.format_axis_array(view, axis) (
"invalid vector query: $(fetch_vector.query)\n" *
"for the axis query: $(view.axes[axis].query)\n" *
Expand Down Expand Up @@ -731,7 +731,7 @@ function Formats.format_get_matrix(
fetch_matrix = view.matrices[rows_axis][columns_axis][name]
matrix_value = fetch_matrix.value
if matrix_value === nothing
matrix_value = Formats.read_only_array(get_query(view.daf, fetch_matrix.query))
matrix_value = Formats.read_only_array(get_query(view.daf, fetch_matrix.query; cache = false))
fetch_matrix.value = matrix_value
end
return matrix_value
Expand Down

0 comments on commit 1a6a2f8

Please sign in to comment.