  We introduce the category of information structures, whose objects are
suitable diagrams of measurable sets that encode the possible outputs of a
given family of observables and their mutual relationships of refinement; they
serve as mathematical models of contextuality in classical and quantum
settings. Each information structure can be regarded as a ringed site with
trivial topology; the structure ring is generated by the observables themselves
and its multiplication corresponds to joint measurement. We extend Baudot and
Bennequin's definition of information cohomology to this setting, as a derived
functor in the category of modules over the structure ring, and show explicitly
that the bar construction gives a projective resolution in that category,
recovering in this way the cochain complexes previously considered in the
literature. Finally, we study the particular case of a one-parameter family of
coefficients made of functions of probability distributions. The only
1-cocycles are Shannon entropy or Tsallis $\alpha$-entropy, depending on the
value of the parameter.
