Cache optimisations

main
Inga 🏳‍🌈 14 years ago
parent b52fcb62d1
commit a2ce385705
  1. 4
      Common/dataobjects/PostLayer.cs
  2. 4
      Common/dataobjects/PunishmentType.cs
  3. 6
      Common/dataobjects/Skin.cs

@ -53,10 +53,10 @@ namespace FLocal.Common.dataobjects {
public static IEnumerable<PostLayer> allLayers {
get {
return
from id in Cache<IEnumerable<int>>.instance.get(
from id in Cache<List<int>>.instance.get(
allLayers_Locker,
() => {
IEnumerable<int> ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions(
List<int> ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions(
TableSpec.instance,
new FLocal.Core.DB.conditions.EmptyCondition(),
Diapasone.unlimited

@ -78,10 +78,10 @@ namespace FLocal.Common.dataobjects {
public static IEnumerable<PunishmentType> allTypes {
get {
return
from id in Cache<IEnumerable<int>>.instance.get(
from id in Cache<List<int>>.instance.get(
allTypes_Locker,
() => {
IEnumerable<int> ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions(
List<int> ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions(
TableSpec.instance,
new FLocal.Core.DB.conditions.EmptyCondition(),
Diapasone.unlimited

@ -38,14 +38,14 @@ namespace FLocal.Common.dataobjects {
public static IEnumerable<Skin> allSkins {
get {
return
from id in Cache<IEnumerable<int>>.instance.get(
from id in Cache<List<int>>.instance.get(
allSkins_Locker,
() => {
IEnumerable<int> ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions(
List<int> ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions(
TableSpec.instance,
new FLocal.Core.DB.conditions.EmptyCondition(),
Diapasone.unlimited
) select int.Parse(stringId);
) select int.Parse(stringId)).ToList();
Skin.LoadByIds(ids);
return ids;
}

Loading…
Cancel
Save